diff options
author | Damien Miller <djm@mindrot.org> | 2000-02-02 19:17:40 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2000-02-02 19:17:40 +1100 |
commit | 6552758baeaeaf241a0a6c67e2e0a035d31bdf79 (patch) | |
tree | 3290eacfcd01570b523dedda250dd87a4b67c553 | |
parent | 9e53f35a6a5dd60fe134ec82d1ac0b1da3787446 (diff) |
- Fix lastlog code for directory based lastlogs. Fix from Josh Durham
<jmd@aoe.vt.edu>
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | login.c | 4 |
2 files changed, 6 insertions, 2 deletions
@@ -1,3 +1,7 @@ | |||
1 | 20000202 | ||
2 | - Fix lastlog code for directory based lastlogs. Fix from Josh Durham | ||
3 | <jmd@aoe.vt.edu> | ||
4 | |||
1 | 20000201 | 5 | 20000201 |
2 | - Use socket pairs by default (instead of pipes). Prevents race condition | 6 | - Use socket pairs by default (instead of pipes). Prevents race condition |
3 | on several (buggy) OSs. Report and fix from tridge@linuxcare.com | 7 | on several (buggy) OSs. Report and fix from tridge@linuxcare.com |
@@ -18,7 +18,7 @@ | |||
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include "includes.h" | 20 | #include "includes.h" |
21 | RCSID("$Id: login.c,v 1.21 2000/01/29 09:55:10 damien Exp $"); | 21 | RCSID("$Id: login.c,v 1.22 2000/02/02 08:17:41 damien Exp $"); |
22 | 22 | ||
23 | #if defined(HAVE_UTMPX_H) && defined(USE_UTMPX) | 23 | #if defined(HAVE_UTMPX_H) && defined(USE_UTMPX) |
24 | # include <utmpx.h> | 24 | # include <utmpx.h> |
@@ -255,7 +255,7 @@ record_login(int pid, const char *ttyname, const char *user, uid_t uid, | |||
255 | strncpy(ll.ll_line, ttyname + 5, sizeof(ll.ll_line)); | 255 | strncpy(ll.ll_line, ttyname + 5, sizeof(ll.ll_line)); |
256 | strncpy(ll.ll_host, host, sizeof(ll.ll_host)); | 256 | strncpy(ll.ll_host, host, sizeof(ll.ll_host)); |
257 | #ifdef LASTLOG_IS_DIR | 257 | #ifdef LASTLOG_IS_DIR |
258 | snprintf(buf, sizeof(buf), "%s/%s", lastlog, logname); | 258 | snprintf(buf, sizeof(buf), "%s/%s", lastlog, user); |
259 | fd = open(buf, O_RDWR); | 259 | fd = open(buf, O_RDWR); |
260 | if (fd >= 0) { | 260 | if (fd >= 0) { |
261 | #else /* LASTLOG_IS_DIR */ | 261 | #else /* LASTLOG_IS_DIR */ |