]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ftpd(8): fix user context handling.
authorEugene Grosbein <eugen@FreeBSD.org>
Fri, 6 Oct 2017 13:46:05 +0000 (13:46 +0000)
committerEugene Grosbein <eugen@FreeBSD.org>
Fri, 6 Oct 2017 13:46:05 +0000 (13:46 +0000)
commitde8d85c908d0ee7bd69f69dc1b9475f30a321eb4
tree65f3f3cd26f04047a032cc2337c3b7cec9ac98d8
parent31329820e5dd13b48fb1f2dd830b5f8259554fca
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
libexec/ftpd/ftpd.c