HomeFreeBSD

ftpd(8): fix user context handling.

Description

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: avg (mentor), mav (mentor)
MFC after: 1 week

Details

Provenance
eugenAuthored on
Parents
rS324363: Oversight on armv7 bulk commit: Make MACHINE_ARCH be armv7 for new
Branches
Unknown
Tags
Unknown