cdown / rpms / util-linux

Forked from rpms/util-linux 2 years ago
Clone

Blame SOURCES/2.23-login-lastlog-create.patch

9d84b2
diff -up util-linux-2.23.2/login-utils/login.c.kzak util-linux-2.23.2/login-utils/login.c
9d84b2
--- util-linux-2.23.2/login-utils/login.c.kzak	2013-07-30 10:39:26.222738397 +0200
9d84b2
+++ util-linux-2.23.2/login-utils/login.c	2013-09-09 09:01:39.923225757 +0200
9d84b2
@@ -502,7 +502,7 @@ static void log_lastlog(struct login_con
9d84b2
 	if (!cxt->pwd)
9d84b2
 		return;
9d84b2
 
9d84b2
-	fd = open(_PATH_LASTLOG, O_RDWR, 0);
9d84b2
+	fd = open(_PATH_LASTLOG, O_RDWR | O_CREAT, 0);
9d84b2
 	if (fd < 0)
9d84b2
 		return;
9d84b2