diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2011-12-14 01:25:47 +0100 |
---|---|---|
committer | Michal Schmidt <mschmidt@redhat.com> | 2011-12-14 01:25:47 +0100 |
commit | ce9593140b127ce782e2fa2f47fc55558b331126 (patch) | |
tree | 0290b870f0a2dd39ef61f8adf473ae1975b588d0 /src/pam-module.c | |
parent | cd0504d0a13d8297b97c9238fd1b94b4141c5aa8 (diff) |
pam-module: add a couple of debugging prints
Diffstat (limited to 'src/pam-module.c')
-rw-r--r-- | src/pam-module.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/pam-module.c b/src/pam-module.c index 46b7becc5d..9002f4e06d 100644 --- a/src/pam-module.c +++ b/src/pam-module.c @@ -521,6 +521,11 @@ _public_ PAM_EXTERN int pam_sm_open_session( goto finish; } + if (debug) + pam_syslog(handle, LOG_DEBUG, "Asking logind to create session: " + "uid=%u pid=%u service=%s type=%s seat=%s vtnr=%u tty=%s display=%s remote=%s remote_user=%s remote_host=%s", + uid, pid, service, type, seat, vtnr, tty, display, yes_no(remote), remote_user, remote_host); + reply = dbus_connection_send_with_reply_and_block(bus, m, -1, &error); if (!reply) { pam_syslog(handle, LOG_ERR, "Failed to create session: %s", bus_error_message(&error)); @@ -541,6 +546,11 @@ _public_ PAM_EXTERN int pam_sm_open_session( goto finish; } + if (debug) + pam_syslog(handle, LOG_DEBUG, "Reply from logind: " + "id=%s object_path=%s runtime_path=%s session_fd=%d seat=%s vtnr=%u", + id, object_path, runtime_path, session_fd, seat, vtnr); + r = pam_misc_setenv(handle, "XDG_SESSION_ID", id, 0); if (r != PAM_SUCCESS) { pam_syslog(handle, LOG_ERR, "Failed to set session id."); |