Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37750346
en ru br
ALT Linux repos
S:2.39.2-alt1
5.0: 2.14.1-alt1
4.1: 2.13-alt8
4.0: 2.12r-alt6
3.0: 2.12q-alt1

Group :: System/Base
RPM: util-linux

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: 0001-ALT-Create-var-log-lastlog.patch
Download


From 0d23339c10ac94d08b532bafd4fe2f51430c08eb Mon Sep 17 00:00:00 2001
From: Alexey Gladkov <legion@altlinux.org>
Date: Thu, 14 May 2020 16:08:13 +0300
Subject: ALT: Create /var/log/lastlog
Signed-off-by: Alexey Gladkov <legion@altlinux.org>
---
 util-linux/login-utils/login.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/util-linux/login-utils/login.c b/util-linux/login-utils/login.c
index 2c146b97..12828429 100644
--- a/util-linux/login-utils/login.c
+++ b/util-linux/login-utils/login.c
@@ -674,7 +674,7 @@ static void log_lastlog(struct login_context *cxt)
 	sa.sa_handler = SIG_IGN;
 	sigaction(SIGXFSZ, &sa, &oldsa_xfsz);
 
-	fd = open(_PATH_LASTLOG, O_RDWR, 0);
+	fd = open(_PATH_LASTLOG, O_RDWR | O_CREAT, 0);
 	if (fd < 0)
 		goto done;
 	offset = cxt->pwd->pw_uid * sizeof(ll);
-- 
2.25.4
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin