Lines 26-31
Link Here
|
26 |
#include <sys/types.h> |
26 |
#include <sys/types.h> |
27 |
#include <syslog.h> |
27 |
#include <syslog.h> |
28 |
#include <unistd.h> |
28 |
#include <unistd.h> |
|
|
29 |
#include <paths.h> |
29 |
|
30 |
|
30 |
#if defined(hpux) || defined(sunos) || defined(solaris) |
31 |
#if defined(hpux) || defined(sunos) || defined(solaris) |
31 |
# ifndef _PATH_LASTLOG |
32 |
# ifndef _PATH_LASTLOG |
Lines 403-409
last_login_write(pam_handle_t *pamh, int announce, int last_fd,
Link Here
|
403 |
|
404 |
|
404 |
if (announce & LASTLOG_WTMP) { |
405 |
if (announce & LASTLOG_WTMP) { |
405 |
/* write wtmp entry for user */ |
406 |
/* write wtmp entry for user */ |
|
|
407 |
#ifdef HAVE_LOGWTMP |
406 |
logwtmp(last_login.ll_line, user, remote_host); |
408 |
logwtmp(last_login.ll_line, user, remote_host); |
|
|
409 |
#endif |
407 |
} |
410 |
} |
408 |
|
411 |
|
409 |
/* cleanup */ |
412 |
/* cleanup */ |
Lines 714-720
pam_sm_close_session (pam_handle_t *pamh, int flags,
Link Here
|
714 |
terminal_line = get_tty(pamh); |
717 |
terminal_line = get_tty(pamh); |
715 |
|
718 |
|
716 |
/* Wipe out utmp logout entry */ |
719 |
/* Wipe out utmp logout entry */ |
|
|
720 |
#ifdef HAVE_LOGWTMP |
717 |
logwtmp(terminal_line, "", ""); |
721 |
logwtmp(terminal_line, "", ""); |
|
|
722 |
#endif |
718 |
|
723 |
|
719 |
return PAM_SUCCESS; |
724 |
return PAM_SUCCESS; |
720 |
} |
725 |
} |