Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Aug 2001 17:56:39 +0000 (GMT)
From:      "Eugene L. Vorokov" <vel@bugz.infotecs.ru>
To:        freebsd-hackers@freebsd.org
Subject:   [PATCH] pam_wheel fix
Message-ID:  <200108071756.f77HudU83274@bugz.infotecs.ru>

index | next in thread | raw e-mail

[-- Attachment #1 --]
Hello,

can anyone please commit this fix to pam_wheel authentication module. It
fixed two problem I mentioned in my previous mail (currently for any
non-root user PAM_IGNORE is returned, and in case of auth_as_self and
debug options used together it logs strange things instead of username).

The patch must be applied in src/lib/libpam/modules/pam_wheel/

Regards,
Eugene


[-- Attachment #2 --]
--- pam_wheel_old.c     Tue Aug  7 17:46:20 2001
+++ pam_wheel.c Tue Aug  7 17:48:04 2001
@@ -84,11 +84,14 @@
                        PAM_RETURN(retval);
                pwd = getpwnam(user);
        }
+       
+       if (!pwd)
+               PAM_RETURN(PAM_IGNORE);
 
-       PAM_LOG("Got user: %s", user);
+       PAM_LOG("Got user: %s", pwd->pw_name);
 
        /* Ignore if already uid 0 */
-       if (pwd->pw_uid)
+       if (!pwd->pw_uid)
                PAM_RETURN(PAM_IGNORE);
 
        PAM_LOG("Not superuser");
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200108071756.f77HudU83274>