]> granicus.if.org Git - linux-pam/commitdiff
Relevant BUGIDs:
authorThorsten Kukuk <kukuk@thkukuk.de>
Tue, 14 Sep 2004 13:48:38 +0000 (13:48 +0000)
committerThorsten Kukuk <kukuk@thkukuk.de>
Tue, 14 Sep 2004 13:48:38 +0000 (13:48 +0000)
Purpose of commit:

Commit summary:
---------------

bugfix: Bug 1027903 and 1027912

CHANGELOG
libpam/pam_start.c
modules/pam_unix/support.c

index 6ae4daa1cd64139b065295f6e007903aafe353e0..e510a164d03cb00d5ac7a74974b229379a5b1070 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -82,6 +82,10 @@ BerliOS Bugs are marked with (BerliOS #XXXX).
   (patch by "Dmitry V. Levin" <ldv@altlinux.org>) (Bug 812567 - baggins).
 * doc/modules/pam_mkhomedir.sgml: Remove wrong debug options 
   (Bug 591605 - kukuk)
+* pam_unix: Call password checking helper whenever the password field
+  contains only one character (Bug 1027903 - kukuk)
+* libpam/pam_start.c: All service names should be files below /etc/pam.d
+  and nothing else. Forbid paths. (Bug 1027912 - kukuk)
 
 
 0.77: Mon Sep 23 10:25:42 PDT 2002
index ef1dae1dd823fb3e6a72978179829f7f5ce773b7..f89558541910ba22a2496a81447d6d4c45c77d88 100644 (file)
@@ -34,6 +34,11 @@ int pam_start (
        return (PAM_BUF_ERR);
     }
 
+    /* All service names should be files below /etc/pam.d and nothing
+       else. Forbid paths. */
+    if (strrchr(service_name, '/') != NULL)
+       service_name = strrchr(service_name, '/') + 1;
+    
     /* Mark the caller as the application - permission to do certain
        things is limited to a module or an application */
 
index 1b55d23bf60d0b4891233b40d8bc420f6b9710ec..5486e12f9014445e9b915f31cb29e19e1a9ffced 100644 (file)
@@ -554,7 +554,7 @@ int _unix_verify_password(pam_handle_t * pamh, const char *name
        }
 
        retval = PAM_SUCCESS;
-       if (pwd == NULL || salt == NULL || !strcmp(salt, "x")) {
+       if (pwd == NULL || salt == NULL || strlen(salt) == 1) {
                if (geteuid()) {
                        /* we are not root perhaps this is the reason? Run helper */
                        D(("running helper binary"));