summaryrefslogtreecommitdiff
path: root/debian/patches-applied/055_pam_unix_nullok_secure
diff options
context:
space:
mode:
authorSteve Langasek <vorlon@debian.org>2008-08-20 11:54:30 -0700
committerSteve Langasek <steve.langasek@ubuntu.com>2019-01-03 17:28:19 -0800
commitbc707b347e558bb3ef99e50ecf17cfbbf7e0a096 (patch)
tree1317dda2c131956eaf591313ebc281a6bacf442d /debian/patches-applied/055_pam_unix_nullok_secure
parent9ee60a722df7dd81a99b380c706c5919cf5cce56 (diff)
055_pam_unix_nullok_secure: don't call _pammodutil_tty_secure with a NULL
tty argument, since this will cause our helper to segfault instead of returning a useful value. Thanks to Troy Davis for the report. Closes: #495806.
Diffstat (limited to 'debian/patches-applied/055_pam_unix_nullok_secure')
-rw-r--r--debian/patches-applied/055_pam_unix_nullok_secure8
1 files changed, 4 insertions, 4 deletions
diff --git a/debian/patches-applied/055_pam_unix_nullok_secure b/debian/patches-applied/055_pam_unix_nullok_secure
index 6e4c561b..7ef6a6a2 100644
--- a/debian/patches-applied/055_pam_unix_nullok_secure
+++ b/debian/patches-applied/055_pam_unix_nullok_secure
@@ -56,11 +56,11 @@ Index: pam.deb/modules/pam_unix/support.c
+ if (on(UNIX_NULLOK_SECURE, ctrl)) {
+ const void *uttyname;
+ retval = pam_get_item(pamh, PAM_TTY, &uttyname);
-+ if (retval != PAM_SUCCESS || uttyname == NULL)
++ if (retval != PAM_SUCCESS || uttyname == NULL
++ || _pammodutil_tty_secure(pamh, (const char *)uttyname) != PAM_SUCCESS)
++ {
+ nullok = 0;
-+
-+ if (_pammodutil_tty_secure(pamh, (const char *)uttyname) != PAM_SUCCESS)
-+ nullok = 0;
++ }
+ }
+
+ if (nullok) {