util-linux/util-linux-2.12p-login-lastlog.patch
kzak 4391fdcaa8 - added /var/log/lastlog to util-linux (#151635)
- disabled 'newgrp' in util-linux (enabled in shadow-utils) (#149997,
    #151613)
- improved mtab lock (#143118)
- fixed ipcs typo (#151156)
- implemented mount workaround for duplicated labels (#116300)
2005-03-25 11:45:47 +00:00

12 lines
484 B
Diff

--- util-linux-2.12p/login-utils/login.c.login-lastlog 2005-03-24 13:26:06.516865128 +0100
+++ util-linux-2.12p/login-utils/login.c 2005-03-24 13:26:58.136017824 +0100
@@ -1397,7 +1397,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) &&