HomeFreeBSD

MFC r324364: ftpd(8): fix user context handling

Description

MFC r324364: ftpd(8): fix user context handling

Apply authenticated user context after update of wtmp(5) at start of session,
so that ftpd process is not killed by kernel with SIGXFSZ when user has
"filesize" limit lower than size of system wtmp file. Same applies
to session finalization: revert to super-user context before update of wtmp.

If ftpd hits limit while writing a file at user request,
do not get killed with SIGXFSZ instantly but apparently ignore the signal,
process error and report it to the user, and continue with the session.

PR: 143570
Approved by: mav (mentor)

Details

Provenance
eugenAuthored on
Parents
rS325471: MFC r324364: ftpd(8): fix user context handling
Branches
Unknown
Tags
Unknown