]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r324364: ftpd(8): fix user context handling
authoreugen <eugen@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 6 Nov 2017 11:11:44 +0000 (11:11 +0000)
committereugen <eugen@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 6 Nov 2017 11:11:44 +0000 (11:11 +0000)
commit7dfcd32923d14cdb94c362507b2c89ad3e23c7c7
tree61289586a514d6391ed8818d6bd3dd40dd736134
parent941f5de730f4b5bc7eede2ffe1501870ffcdcf68
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)

git-svn-id: svn://svn.freebsd.org/base/stable/10@325472 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
libexec/ftpd/ftpd.c