]> granicus.if.org Git - linux-pam/commitdiff
Relevant BUGIDs: 113238
authorSteve Langasek <vorlon@debian.org>
Thu, 31 Aug 2000 17:15:30 +0000 (17:15 +0000)
committerSteve Langasek <vorlon@debian.org>
Thu, 31 Aug 2000 17:15:30 +0000 (17:15 +0000)
Purpose of commit: bugfix to pam_unix

Commit summary:
---------------
Fixed case where pam_unix would segfault if the app's conversation function
returned a null pointer as the password.  Since a null pointer can never be
a valid password unless the password file also has a null field (which we
already check for), we now check for a valid pointer and return PAM_AUTH_ERR
if we don't have one.

modules/pam_unix/support.c

index 610b29a725487d7a67dbc888280d4de3577ed3e7..256e49998f65fcfc400db3ac02d003aee4b35d63 100644 (file)
@@ -525,6 +525,8 @@ int _unix_verify_password(pam_handle_t * pamh, const char *name
                                D(("user has empty password - access denied"));
                                retval = PAM_AUTH_ERR;
                        }
+               } else if (!p) {
+                               retval = PAM_AUTH_ERR;
                } else {
                        if (!strncmp(salt, "$1$", 3)) {
                                pp = Goodcrypt_md5(p, salt);