Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-updates-src > by-pkgid > 9a9a4f12cd8b4dc8b47eadf5011908a2 > files > 30

util-linux-2.25.2-3.2.mga5.src.rpm

--- util-linux-2.21/login-utils/login.c.lastlog	2012-02-10 15:16:07.000000000 +0100
+++ util-linux-2.21/login-utils/login.c	2012-02-26 02:56:13.776757244 +0100
@@ -503,7 +503,7 @@ static void log_lastlog(struct login_con
 	if (!cxt->pwd)
 		return;
 
-	fd = open(_PATH_LASTLOG, O_RDWR, 0);
+	fd = open(_PATH_LASTLOG, O_RDWR|O_CREAT, 0);
 	if (fd < 0)
 		return;