summaryrefslogtreecommitdiffstats
path: root/login.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-02-02 19:17:40 +1100
committerDamien Miller <djm@mindrot.org>2000-02-02 19:17:40 +1100
commit6552758baeaeaf241a0a6c67e2e0a035d31bdf79 (patch)
tree3290eacfcd01570b523dedda250dd87a4b67c553 /login.c
parent9e53f35a6a5dd60fe134ec82d1ac0b1da3787446 (diff)
- Fix lastlog code for directory based lastlogs. Fix from Josh Durham
<jmd@aoe.vt.edu>
Diffstat (limited to 'login.c')
-rw-r--r--login.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/login.c b/login.c
index 54d44205..da11b245 100644
--- a/login.c
+++ b/login.c
@@ -18,7 +18,7 @@
*/
#include "includes.h"
-RCSID("$Id: login.c,v 1.21 2000/01/29 09:55:10 damien Exp $");
+RCSID("$Id: login.c,v 1.22 2000/02/02 08:17:41 damien Exp $");
#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX)
# include <utmpx.h>
@@ -255,7 +255,7 @@ record_login(int pid, const char *ttyname, const char *user, uid_t uid,
strncpy(ll.ll_line, ttyname + 5, sizeof(ll.ll_line));
strncpy(ll.ll_host, host, sizeof(ll.ll_host));
#ifdef LASTLOG_IS_DIR
- snprintf(buf, sizeof(buf), "%s/%s", lastlog, logname);
+ snprintf(buf, sizeof(buf), "%s/%s", lastlog, user);
fd = open(buf, O_RDWR);
if (fd >= 0) {
#else /* LASTLOG_IS_DIR */