Hiya,
so, what happens is that systemd (and upstart, I suspect) sends SIGTERM
to su when the pam session is closed.
src/su.c:prepare_pam_close_session ends with:
(void) pam_setcred (pamh, PAM_DELETE_CRED);
(void) pam_end (pamh, PAM_SUCCESS);
if (0 != caught) {
(void) signal (SIGALRM, kill_child);
(void) alarm (2);
(void) wait (&status);
(void) fputs (_(" ...terminated.\n"), stderr);
}
exit ((0 != WIFEXITED (status)) ? WEXITSTATUS (status)
: WTERMSIG (status) + 128);
/* Only the child returns. See above. */
}
signal + alarm there is to ensure that any signals in the pam cleanup
phase causes the termination of the child, but this is already done by
systemd.
I think just dropping the fputs should be reasonable enough.
Alternatively, I can make systemd not send SIGTERM to the session
leader. I'm not entirely sure why it does that in the first place, but
I've asked upstream to comment.
--
Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]