]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
login: Clean up PAM and audit, then exit, on SIGHUP and SIGTERM.
authorjilles <jilles@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 6 Apr 2014 10:56:27 +0000 (10:56 +0000)
committerjilles <jilles@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 6 Apr 2014 10:56:27 +0000 (10:56 +0000)
commite4af743ddf40d787a88480946d005bc254c2c3b2
tree04b30fdcae15b63f04db7cac3e8002a36933ef3e
parent59e4ea59cc35bb94d0cf7942c5268ef2500e6026
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/10@264192 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
usr.bin/login/login.c