Skip site navigation (1)Skip section navigation (2)
Date:      20 Feb 2002 01:06:24 +0100
From:      Dag-Erling Smorgrav <des@ofug.org>
To:        Maxim Sobolev <sobomax@FreeBSD.org>
Cc:        current@FreeBSD.org
Subject:   Re: Either PAM or login is broken
Message-ID:  <xzpy9hpdnjz.fsf@flood.ping.uio.no>
In-Reply-To: <3C729655.27B995F2@FreeBSD.org>
References:  <3C72944A.8C6EDF79@FreeBSD.org> <3C729655.27B995F2@FreeBSD.org>

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

Maxim Sobolev <sobomax@FreeBSD.org> 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




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