From owner-cvs-src Sat Feb 15 16:36:17 2003 Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 63ECB37B401; Sat, 15 Feb 2003 16:36:15 -0800 (PST) Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2C60343FBD; Sat, 15 Feb 2003 16:36:14 -0800 (PST) (envelope-from ache@pobrecita.freebsd.ru) Received: from pobrecita.freebsd.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.12.7/8.12.7) with ESMTP id h1G0aDEJ073458; Sun, 16 Feb 2003 03:36:13 +0300 (MSK) (envelope-from ache@pobrecita.freebsd.ru) Received: (from ache@localhost) by pobrecita.freebsd.ru (8.12.7/8.12.6/Submit) id h1G0aCYW073457; Sun, 16 Feb 2003 03:36:12 +0300 (MSK) (envelope-from ache) Date: Sun, 16 Feb 2003 03:36:12 +0300 From: "Andrey A. Chernov" To: Dag-Erling Smorgrav Cc: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: Correct patch (was Re: cvs commit: src/lib/libpam/modules/pam_opieaccess pam_opieaccess.c) Message-ID: <20030216003612.GA73416@nagual.pp.ru> References: <200302152326.h1FNQnAr027546@repoman.freebsd.org> <20030215233943.GC72156@nagual.pp.ru> <20030215235556.GI72156@nagual.pp.ru> <20030216000711.GA72930@nagual.pp.ru> <20030216001101.GB72930@nagual.pp.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030216001101.GB72930@nagual.pp.ru> User-Agent: Mutt/1.5.1i Sender: owner-cvs-src@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Feb 16, 2003 at 03:11:02 +0300, Andrey A. Chernov wrote: > I mean this code must be added before passing host to OPIE functions: Here is exact patch to pam_opieaccess.c Please commit it and back out your /etc/opieaccess change --- pam_opieaccess.c.bak Sun Feb 16 02:26:49 2003 +++ pam_opieaccess.c Sun Feb 16 03:32:57 2003 @@ -42,6 +42,7 @@ #include #include #include +#include #include #include @@ -73,8 +74,8 @@ r = pam_get_item(pamh, PAM_RHOST, (const void **)&rhost); if (r != PAM_SUCCESS) return (r); - if (rhost == NULL) - rhost = "localhost"; + if (rhost == NULL || strcasecmp(rhost, "localhost") == 0) + rhost = ""; if (opieaccessfile(rhost) != 0 && opiealways(pwent->pw_dir) != 0) return (PAM_SUCCESS); -- Andrey A. Chernov http://ache.pp.ru/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-src" in the body of the message