summaryrefslogtreecommitdiff
path: root/modules/pam_unix/pam_unix_sess.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/pam_unix/pam_unix_sess.c')
-rw-r--r--modules/pam_unix/pam_unix_sess.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/pam_unix/pam_unix_sess.c b/modules/pam_unix/pam_unix_sess.c
index d1376732..5d001816 100644
--- a/modules/pam_unix/pam_unix_sess.c
+++ b/modules/pam_unix/pam_unix_sess.c
@@ -96,8 +96,9 @@ pam_sm_open_session(pam_handle_t *pamh, int flags, int argc, const char **argv)
if (login_name == NULL) {
login_name = "";
}
- pam_syslog(pamh, LOG_INFO, "session opened for user %s by %s(uid=%lu)",
- user_name, login_name, (unsigned long)getuid());
+ if (off (UNIX_QUIET, ctrl))
+ pam_syslog(pamh, LOG_INFO, "session opened for user %s by %s(uid=%lu)",
+ user_name, login_name, (unsigned long)getuid());
return PAM_SUCCESS;
}
@@ -126,8 +127,9 @@ pam_sm_close_session(pam_handle_t *pamh, int flags, int argc, const char **argv)
"close_session - error recovering service");
return PAM_SESSION_ERR;
}
- pam_syslog(pamh, LOG_INFO, "session closed for user %s",
- user_name);
+ if (off (UNIX_QUIET, ctrl))
+ pam_syslog(pamh, LOG_INFO, "session closed for user %s",
+ user_name);
return PAM_SUCCESS;
}