- Fix lastlog code for directory based lastlogs. Fix from Josh Durham
<jmd@aoe.vt.edu>
This commit is contained in:
parent
9e53f35a6a
commit
6552758bae
|
@ -1,3 +1,7 @@
|
||||||
|
20000202
|
||||||
|
- Fix lastlog code for directory based lastlogs. Fix from Josh Durham
|
||||||
|
<jmd@aoe.vt.edu>
|
||||||
|
|
||||||
20000201
|
20000201
|
||||||
- Use socket pairs by default (instead of pipes). Prevents race condition
|
- Use socket pairs by default (instead of pipes). Prevents race condition
|
||||||
on several (buggy) OSs. Report and fix from tridge@linuxcare.com
|
on several (buggy) OSs. Report and fix from tridge@linuxcare.com
|
||||||
|
|
4
login.c
4
login.c
|
@ -18,7 +18,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#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)
|
#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX)
|
||||||
# include <utmpx.h>
|
# 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_line, ttyname + 5, sizeof(ll.ll_line));
|
||||||
strncpy(ll.ll_host, host, sizeof(ll.ll_host));
|
strncpy(ll.ll_host, host, sizeof(ll.ll_host));
|
||||||
#ifdef LASTLOG_IS_DIR
|
#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);
|
fd = open(buf, O_RDWR);
|
||||||
if (fd >= 0) {
|
if (fd >= 0) {
|
||||||
#else /* LASTLOG_IS_DIR */
|
#else /* LASTLOG_IS_DIR */
|
||||||
|
|
Loading…
Reference in New Issue