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>

next in thread | raw e-mail | index | archive | help

--%--multipart-mixed-boundary-1.83211.997206999--%
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

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


--%--multipart-mixed-boundary-1.83211.997206999--%
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Description: ASCII C program text
Content-Disposition: attachment; filename="pam_wheel.patch"

--- 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");

--%--multipart-mixed-boundary-1.83211.997206999--%--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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