From owner-freebsd-hackers Tue Aug 7 6:58:12 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from bugz.infotecs.ru (bugz.infotecs.ru [195.210.139.22]) by hub.freebsd.org (Postfix) with ESMTP id 5CF2937B403 for ; Tue, 7 Aug 2001 06:57:39 -0700 (PDT) (envelope-from vel@bugz.infotecs.ru) Received: (from root@localhost) by bugz.infotecs.ru (8.11.5/8.11.4) id f77HudU83274 for freebsd-hackers@freebsd.org; Tue, 7 Aug 2001 17:56:39 GMT (envelope-from vel) From: "Eugene L. Vorokov" Message-Id: <200108071756.f77HudU83274@bugz.infotecs.ru> Subject: [PATCH] pam_wheel fix To: freebsd-hackers@freebsd.org Date: Tue, 7 Aug 2001 17:56:39 +0000 (GMT) X-Mailer: ELM [version 2.5 PL5] MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="%--multipart-mixed-boundary-1.83211.997206999--%" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --%--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