]> granicus.if.org Git - linux-pam/commitdiff
Relevant BUGIDs:
authorTomas Mraz <tm@t8m.info>
Wed, 21 Feb 2007 20:27:28 +0000 (20:27 +0000)
committerTomas Mraz <tm@t8m.info>
Wed, 21 Feb 2007 20:27:28 +0000 (20:27 +0000)
Purpose of commit: cleanup

Commit summary:
---------------
2007-02-21  Tomas Mraz  <t8m@centrum.cz>

        * modules/pam_unix/unix_chkpwd.c (_unix_verify_password): Test for
        allocation failure in bigcrypt().

        * modules/pam_unix/pam_unix_passwd.c (pam_sm_chauthtok): Allow modification
        of '*' password by root.

ChangeLog
modules/pam_unix/pam_unix_passwd.c
modules/pam_unix/unix_chkpwd.c

index 091d5d88ba4a30f585fe4313540be8536b51a72c..5bd2a18e7215d88636b4c76de9aad71528a9a671 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-02-21  Tomas Mraz  <t8m@centrum.cz>
+
+       * modules/pam_unix/unix_chkpwd.c (_unix_verify_password): Test for
+       allocation failure in bigcrypt().
+       
+       * modules/pam_unix/pam_unix_passwd.c (pam_sm_chauthtok): Allow modification
+       of '*' password by root.
+
 2007-02-06  Tomas Mraz  <t8m@centrum.cz>
 
        * modules/pam_loginuid/pam_loginuid.c (set_loginuid): Remove
index 8921d1cc11aad85f81b30528dcec0f28be13d5ff..bec856f478ee510b80de80ce990b30eaccc0526c 100644 (file)
@@ -1077,13 +1077,6 @@ PAM_EXTERN int pam_sm_chauthtok(pam_handle_t * pamh, int flags,
                                user);
                        return PAM_USER_UNKNOWN;
                }
-               if (!_unix_shadowed(pwd) &&
-                   (strchr(pwd->pw_passwd, '*') != NULL)) {
-                       pam_syslog(pamh, LOG_DEBUG,
-                               "user \"%s\" does not have modifiable password",
-                               user);
-                       return PAM_USER_UNKNOWN;
-               }
        }
 
        /*
index 0ef2ccd8f75bf2f5b571840c20854dcc741c02ab..236ad5c213c3254f5c9bd67d19e818321a7f4316 100644 (file)
@@ -229,11 +229,11 @@ static int _unix_verify_password(const char *name, const char *p, int nullok)
                 * stored string with the subset of bigcrypt's result.
                 * Bug 521314.
                 */
-               if (salt_len == 13 && strlen(pp) > salt_len) {
+               if (pp && salt_len == 13 && strlen(pp) > salt_len) {
                    _pam_overwrite(pp+salt_len);
                }
                
-               if (strcmp(pp, salt) == 0) {
+               if (pp && strcmp(pp, salt) == 0) {
                        retval = PAM_SUCCESS;
                }
        }