From: Lennart Poettering Date: Thu, 7 May 2020 08:35:48 +0000 (+0200) Subject: pam_systemd: also print debug lines when ending a session X-Git-Tag: v246-rc1~386^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=45c5fa253a7241bfa7791fd39113aa0374b07b2e;p=thirdparty%2Fsystemd.git pam_systemd: also print debug lines when ending a session --- diff --git a/src/login/pam_systemd.c b/src/login/pam_systemd.c index 43587a76610..b6f5562707c 100644 --- a/src/login/pam_systemd.c +++ b/src/login/pam_systemd.c @@ -956,11 +956,23 @@ _public_ PAM_EXTERN int pam_sm_close_session( int argc, const char **argv) { const void *existing = NULL; + bool debug = false; const char *id; int r; assert(handle); + if (parse_argv(handle, + argc, argv, + NULL, + NULL, + NULL, + &debug) < 0) + return PAM_SESSION_ERR; + + if (debug) + pam_syslog(handle, LOG_DEBUG, "pam-systemd shutting down"); + /* Only release session if it wasn't pre-existing when we * tried to create it */ (void) pam_get_data(handle, "systemd.existing", &existing);