diff options
author | Steve Langasek <vorlon@debian.org> | 2009-09-10 03:25:42 -0700 |
---|---|---|
committer | Steve Langasek <vorlon@debian.org> | 2019-01-08 21:26:01 -0800 |
commit | c47d70c3fbfe9a26150323751e7c935f37dc21b8 (patch) | |
tree | cb563ff02cf6c1ce6cfe2b1a644e013c75aba813 | |
parent | 317a18674abe5024e9690b9488d9ede415ff3622 (diff) | |
download | pam-c47d70c3fbfe9a26150323751e7c935f37dc21b8.tar.gz pam-c47d70c3fbfe9a26150323751e7c935f37dc21b8.tar.bz2 pam-c47d70c3fbfe9a26150323751e7c935f37dc21b8.zip |
debian/patches/pam_securetty_tty_check_before_user_check: new patch,
to make pam_securetty always return success on a secure tty regardless
of what username was passed. Thanks to Nicolas François
<nicolas.francois@centraliens.net> for the patch. Closes: #537848
-rw-r--r-- | debian/changelog | 9 | ||||
-rw-r--r-- | debian/patches-applied/pam_securetty_tty_check_before_user_check | 40 | ||||
-rw-r--r-- | debian/patches-applied/series | 1 |
3 files changed, 50 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index f75d1e5f..7e03fb7a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +pam (1.1.0-4) UNRELEASED; urgency=low + + * debian/patches/pam_securetty_tty_check_before_user_check: new patch, + to make pam_securetty always return success on a secure tty regardless + of what username was passed. Thanks to Nicolas François + <nicolas.francois@centraliens.net> for the patch. Closes: #537848 + + -- Steve Langasek <vorlon@debian.org> Thu, 10 Sep 2009 03:20:33 -0700 + pam (1.1.0-3) unstable; urgency=low * Bump debian/compat to 7, so we can use sane contents in debian/*.install diff --git a/debian/patches-applied/pam_securetty_tty_check_before_user_check b/debian/patches-applied/pam_securetty_tty_check_before_user_check new file mode 100644 index 00000000..5f976ab5 --- /dev/null +++ b/debian/patches-applied/pam_securetty_tty_check_before_user_check @@ -0,0 +1,40 @@ +Patch for Debian bug #537848 + +pam_securetty should not return PAM_USER_UNKNOWN when the tty is secure. +regardless of what was entered as a username. + +Authors: Nicolas François <nicolas.francois@centraliens.net> + +Upstream status: committed to CVS + +Index: sid/modules/pam_securetty/pam_securetty.c +=================================================================== +--- sid.orig/modules/pam_securetty/pam_securetty.c 2009-07-23 17:39:36.904158303 +0200 ++++ sid/modules/pam_securetty/pam_securetty.c 2009-07-23 17:48:55.596157670 +0200 +@@ -82,13 +82,11 @@ + } + + user_pwd = pam_modutil_getpwnam(pamh, username); +- if (user_pwd == NULL) { +- return PAM_USER_UNKNOWN; +- } else if (user_pwd->pw_uid != 0) { /* If the user is not root, +- securetty's does not apply +- to them */ ++ if (user_pwd != NULL && user_pwd->pw_uid != 0) { ++ /* If the user is not root, securetty's does not apply to them */ + return PAM_SUCCESS; + } ++ /* The user is now either root or an invalid / mistyped username */ + + retval = pam_get_item(pamh, PAM_TTY, &void_uttyname); + uttyname = void_uttyname; +@@ -102,6 +100,9 @@ + pam_syslog(pamh, LOG_DEBUG, "access allowed for '%s' on '%s'", + username, uttyname); + } else if (retval != PAM_SUCCESS) { ++ if (user_pwd == NULL) { ++ retval = PAM_USER_UNKNOWN; ++ } + pam_syslog(pamh, LOG_WARNING, "access denied: tty '%s' is not secure !", + uttyname); + } diff --git a/debian/patches-applied/series b/debian/patches-applied/series index e7f8120c..dde1da8f 100644 --- a/debian/patches-applied/series +++ b/debian/patches-applied/series @@ -21,3 +21,4 @@ autoconf.patch update-motd fix-man-crud namespace_with_awk_not_gawk +pam_securetty_tty_check_before_user_check |