From owner-freebsd-current Tue Feb 19 16: 6:38 2002 Delivered-To: freebsd-current@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id BD06437B41F; Tue, 19 Feb 2002 16:06:26 -0800 (PST) Received: by flood.ping.uio.no (Postfix, from userid 2602) id 58C445343; Wed, 20 Feb 2002 01:06:25 +0100 (CET) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: Maxim Sobolev Cc: current@FreeBSD.org Subject: Re: Either PAM or login is broken References: <3C72944A.8C6EDF79@FreeBSD.org> <3C729655.27B995F2@FreeBSD.org> From: Dag-Erling Smorgrav Date: 20 Feb 2002 01:06:24 +0100 In-Reply-To: <3C729655.27B995F2@FreeBSD.org> Message-ID: Lines: 16 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.1 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --=-=-= Maxim Sobolev writes: > Ok, I've found the problem - it appears that my machine didn't have a > /var/log/lastlog file and so far pam_lastlog.so was quite happy with > this situation, while after a make world it doesn't tolerate it > anymore. I am not sure that such POLA change is good and IMO > pam_lastlog.so shouldn't refuse login just because there is no > /var/log/lastlog file or at least it should create the file by itself. See attached patch. Please commit it if it solves your problem. DES -- Dag-Erling Smorgrav - des@ofug.org --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=pam_lastlog.diff Index: pam_lastlog.c =================================================================== RCS file: /home/ncvs/src/lib/libpam/modules/pam_lastlog/pam_lastlog.c,v retrieving revision 1.6 diff -u -r1.6 pam_lastlog.c --- pam_lastlog.c 5 Feb 2002 06:08:25 -0000 1.6 +++ pam_lastlog.c 20 Feb 2002 00:04:20 -0000 @@ -149,7 +149,7 @@ if (tty == NULL) PAM_RETURN(PAM_SERVICE_ERR); - fd = open(_PATH_LASTLOG, O_RDWR, 0); + fd = open(_PATH_LASTLOG, O_RDWR|O_CREAT, 0644); if (fd == -1) { syslog(LOG_ERR, "cannot open %s: %m", _PATH_LASTLOG); PAM_RETURN(PAM_SERVICE_ERR); --=-=-=-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message