5972c3
diff -up util-linux-2.36/login-utils/login.c.kzak util-linux-2.36/login-utils/login.c
5972c3
--- util-linux-2.36/login-utils/login.c.kzak	2020-07-23 14:13:26.777030764 +0200
5972c3
+++ util-linux-2.36/login-utils/login.c	2020-07-23 14:11:22.793686983 +0200
5972c3
@@ -585,7 +585,7 @@ static void log_lastlog(struct login_con
5972c3
 	sa.sa_handler = SIG_IGN;
5972c3
 	sigaction(SIGXFSZ, &sa, &oldsa_xfsz);
5972c3
 
5972c3
-	fd = open(_PATH_LASTLOG, O_RDWR, 0);
5972c3
+	fd = open(_PATH_LASTLOG, O_RDWR | O_CREAT, 0);
5972c3
 	if (fd < 0)
5972c3
 		goto done;
5972c3
 	offset = cxt->pwd->pw_uid * sizeof(ll);