diff options
author | des <des@FreeBSD.org> | 2006-08-11 17:03:33 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2006-08-11 17:03:33 +0000 |
commit | 55b6d867eaa0f17178123f720a006cca67b0c14e (patch) | |
tree | 3d54b2ccb65c34cb81e81695454121087d96cad5 /lib/libpam | |
parent | e57c6a567c39a9818e259f2317f120c41a8e0eaa (diff) | |
download | FreeBSD-src-55b6d867eaa0f17178123f720a006cca67b0c14e.zip FreeBSD-src-55b6d867eaa0f17178123f720a006cca67b0c14e.tar.gz |
Additional debugging stuff I had in my tree.
Diffstat (limited to 'lib/libpam')
-rw-r--r-- | lib/libpam/modules/pam_lastlog/pam_lastlog.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/libpam/modules/pam_lastlog/pam_lastlog.c b/lib/libpam/modules/pam_lastlog/pam_lastlog.c index 519d452..2ba43af 100644 --- a/lib/libpam/modules/pam_lastlog/pam_lastlog.c +++ b/lib/libpam/modules/pam_lastlog/pam_lastlog.c @@ -87,12 +87,17 @@ pam_sm_open_session(pam_handle_t *pamh, int flags, PAM_LOG("Got user: %s", user); pam_err = pam_get_item(pamh, PAM_RHOST, &rhost); - if (pam_err != PAM_SUCCESS) + if (pam_err != PAM_SUCCESS) { + PAM_LOG("No PAM_RHOST"); goto err; + } pam_err = pam_get_item(pamh, PAM_TTY, &tty); - if (pam_err != PAM_SUCCESS) + if (pam_err != PAM_SUCCESS) { + PAM_LOG("No PAM_TTY"); goto err; + } if (tty == NULL) { + PAM_LOG("No PAM_TTY"); pam_err = PAM_SERVICE_ERR; goto err; } @@ -102,8 +107,10 @@ pam_sm_open_session(pam_handle_t *pamh, int flags, return (PAM_SERVICE_ERR); fd = open(_PATH_LASTLOG, O_RDWR|O_CREAT, 0644); - if (fd == -1) + if (fd == -1) { + PAM_LOG("Failed to open %s", _PATH_LASTLOG); goto file_err; + } /* * Record session in lastlog(5). |