diff options
author | des <des@FreeBSD.org> | 2014-09-15 11:32:08 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2014-09-15 11:32:08 +0000 |
commit | 0dba5e79e39c9f67a8f141a37d5c6b8fcaff6b46 (patch) | |
tree | f982540b574c85adb21651754d4e907f79f711df /lib | |
parent | 023a2a140b555f4c74215be2db816bc2327ca6e3 (diff) | |
download | FreeBSD-src-0dba5e79e39c9f67a8f141a37d5c6b8fcaff6b46.zip FreeBSD-src-0dba5e79e39c9f67a8f141a37d5c6b8fcaff6b46.tar.gz |
r271256 fixed one segfault condition but introduced another due to the
wrong operator being used in the tty check.
Reported by: avg@
MFH: 3 days
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libpam/modules/pam_login_access/pam_login_access.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libpam/modules/pam_login_access/pam_login_access.c b/lib/libpam/modules/pam_login_access/pam_login_access.c index c0a4e73..a29eb7d 100644 --- a/lib/libpam/modules/pam_login_access/pam_login_access.c +++ b/lib/libpam/modules/pam_login_access/pam_login_access.c @@ -86,7 +86,7 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags __unused, return (PAM_SUCCESS); PAM_VERBOSE_ERROR("%s is not allowed to log in from %s", user, rhost); - } else if (tty != NULL || *(const char *)tty != '\0') { + } else if (tty != NULL && *(const char *)tty != '\0') { PAM_LOG("Checking login.access for user %s on tty %s", (const char *)user, (const char *)tty); if (login_access(user, tty) != 0) |