]> git.pld-linux.org Git - packages/util-linux.git/blame - util-linux-login-lastlog.patch
- nicely stop, without error
[packages/util-linux.git] / util-linux-login-lastlog.patch
CommitLineData
f212f39a 1--- util-linux-ng-2.17.2/login-utils/login.c.orig 2010-03-18 23:11:23.000000000 +0100
2+++ util-linux-ng-2.17.2/login-utils/login.c 2010-05-09 11:42:42.890935908 +0200
3@@ -1431,7 +1431,7 @@
4 struct lastlog ll;
5 int fd;
6
7- if ((fd = open(_PATH_LASTLOG, O_RDWR, 0)) >= 0) {
8+ if ((fd = open(_PATH_LASTLOG, O_RDWR|O_CREAT, 0)) >= 0) {
9 lseek(fd, (off_t)pwd->pw_uid * sizeof(ll), SEEK_SET);
10 if (!quiet) {
11 if (read(fd, (char *)&ll, sizeof(ll)) == sizeof(ll) &&
This page took 0.027969 seconds and 4 git commands to generate.