]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r261193: login: Clean up PAM and audit, then exit, on SIGHUP and SIGTERM
authorjilles <jilles@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 9 Apr 2014 21:19:46 +0000 (21:19 +0000)
committerjilles <jilles@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 9 Apr 2014 21:19:46 +0000 (21:19 +0000)
commit4c703cd9e116ac196a7f13242e0725d076c80f84
treed6602dc1454b5ec7d7d815bf5b91708f001ccac5
parente089371c3ad0f04dce948d3d5478c44a3906b45d
MFC r261193: login: Clean up PAM and audit, then exit, on SIGHUP and SIGTERM

This avoids leaving stale entries in utmpx after the connection is closed on
an open login session. It also allows a clean way (SIGTERM) to forcibly
terminate a user's terminal session.

This does not affect the situation for "hung" processes after the connection
is closed. The foreground process group receives SIGHUP and the tty becomes
inaccessible.

Also replace all use of the obsolete signal() function with sigaction() (not
only the part where it is actually required: SIGHUP and SIGTERM must mask
the other as well when caught).

PR: misc/183495

git-svn-id: svn://svn.freebsd.org/base/stable/9@264309 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
usr.bin/login/login.c