Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > 2d4ad1ca5d26eb2694d23ca68c3b8fe4 > files > 28

util-linux-ng-2.13-3.4mdv2008.0.src.rpm

--- util-linux-ng-2.13-rc3/login-utils/login.c.xxx	2007-08-13 12:11:14.000000000 +0200
+++ util-linux-ng-2.13-rc3/login-utils/login.c	2007-08-13 12:12:24.000000000 +0200
@@ -1402,7 +1402,7 @@
     struct lastlog ll;
     int fd;
 
-    if ((fd = open(_PATH_LASTLOG, O_RDWR, 0)) >= 0) {
+    if ((fd = open(_PATH_LASTLOG, O_RDWR|O_CREAT, 0)) >= 0) {
 	lseek(fd, (off_t)pwd->pw_uid * sizeof(ll), SEEK_SET);
 	if (!quiet) {
 	    if (read(fd, (char *)&ll, sizeof(ll)) == sizeof(ll) &&