Sophie

Sophie

distrib > Mandriva > 2011.0 > i586 > media > main-updates-src > by-pkgid > 27fd89d2f8fc6166d9aeb3e78e998a76 > files > 21

util-linux-2.19-3.2.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) &&