]> granicus.if.org Git - linux-pam/commitdiff
Relevant BUGIDs: Linux-PAM-0-80
authorTomas Mraz <tm@t8m.info>
Fri, 8 Jul 2005 07:42:49 +0000 (07:42 +0000)
committerTomas Mraz <tm@t8m.info>
Fri, 8 Jul 2005 07:42:49 +0000 (07:42 +0000)
Purpose of commit: cleanup

Commit summary:
---------------
Fix for LSB compliance when SELinux enabled.

modules/pam_unix/support.c

index 5368ae20832a528aa38e83f241ef0761cee00de7..09e15bebc234f0111b958ba4f59b8d742522bc8d 100644 (file)
@@ -713,15 +713,10 @@ int _unix_verify_password(pam_handle_t * pamh, const char *name
        retval = PAM_SUCCESS;
        if (pwd == NULL || salt == NULL || !strcmp(salt, "x") || ((salt[0] == '#') && (salt[1] == '#') && !strcmp(salt + 2, name))) {
 
-               if (geteuid() || SELINUX_ENABLED) {
+               if (pwd != NULL && (geteuid() || SELINUX_ENABLED)) {
                        /* we are not root perhaps this is the reason? Run helper */
                        D(("running helper binary"));
                        retval = _unix_run_helper_binary(pamh, p, ctrl, name);
-                       if (pwd == NULL && !on(UNIX_AUDIT,ctrl)
-                           && retval != PAM_SUCCESS)
-                       {
-                               name = NULL;
-                       }
                } else {
                        D(("user's record unavailable"));
                        p = NULL;