summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2002-05-30 20:48:59 +0000
committerdes <des@FreeBSD.org>2002-05-30 20:48:59 +0000
commitda6b7e20d70c31dce111b89854de871277058c10 (patch)
tree55a2ce7020f4192f746d5a1b4727a4841da82cea /lib
parente816ac5daa0200a57970c0489eb3b4131dc9be22 (diff)
downloadFreeBSD-src-da6b7e20d70c31dce111b89854de871277058c10.zip
FreeBSD-src-da6b7e20d70c31dce111b89854de871277058c10.tar.gz
Missed one in previous commit.
Pointed out by: nectar
Diffstat (limited to 'lib')
-rw-r--r--lib/libpam/modules/pam_lastlog/pam_lastlog.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libpam/modules/pam_lastlog/pam_lastlog.c b/lib/libpam/modules/pam_lastlog/pam_lastlog.c
index 5e74967..f33d0a6 100644
--- a/lib/libpam/modules/pam_lastlog/pam_lastlog.c
+++ b/lib/libpam/modules/pam_lastlog/pam_lastlog.c
@@ -88,8 +88,10 @@ pam_sm_open_session(pam_handle_t *pamh, int flags,
pam_err = pam_get_item(pamh, PAM_TTY, (const void **)&tty);
if (pam_err != PAM_SUCCESS)
goto err;
- if (tty == NULL)
- return (PAM_SERVICE_ERR);
+ if (tty == NULL) {
+ pam_err = PAM_SERVICE_ERR;
+ goto err;
+ }
if (strncmp(tty, _PATH_DEV, strlen(_PATH_DEV)) == 0)
tty += strlen(_PATH_DEV);
if (*tty == '\0')
OpenPOWER on IntegriCloud