Blame util-linux-2.12p-login-lastlog.patch
|
|
4391fdc |
--- util-linux-2.12p/login-utils/login.c.login-lastlog 2005-03-24 13:26:06.516865128 +0100
|
|
|
4391fdc |
+++ util-linux-2.12p/login-utils/login.c 2005-03-24 13:26:58.136017824 +0100
|
|
|
4391fdc |
@@ -1397,7 +1397,7 @@
|
|
|
4391fdc |
struct lastlog ll;
|
|
|
4391fdc |
int fd;
|
|
|
4391fdc |
|
|
|
4391fdc |
- if ((fd = open(_PATH_LASTLOG, O_RDWR, 0)) >= 0) {
|
|
|
4391fdc |
+ if ((fd = open(_PATH_LASTLOG, O_RDWR|O_CREAT, 0)) >= 0) {
|
|
|
4391fdc |
lseek(fd, (off_t)pwd->pw_uid * sizeof(ll), SEEK_SET);
|
|
|
4391fdc |
if (!quiet) {
|
|
|
4391fdc |
if (read(fd, (char *)&ll, sizeof(ll)) == sizeof(ll) &&
|