Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 687234 | Differences between
and this patch

Collapse All | Expand All

(-)Linux-PAM-1.1.6/modules/pam_lastlog/pam_lastlog.c (+19 lines)
Lines 23-31 Link Here
23
#include <stdarg.h>
23
#include <stdarg.h>
24
#include <stdio.h>
24
#include <stdio.h>
25
#include <string.h>
25
#include <string.h>
26
#include <sys/file.h>
26
#include <sys/types.h>
27
#include <sys/types.h>
27
#include <syslog.h>
28
#include <syslog.h>
28
#include <unistd.h>
29
#include <unistd.h>
30
#include <paths.h>
29
31
30
#if defined(hpux) || defined(sunos) || defined(solaris)
32
#if defined(hpux) || defined(sunos) || defined(solaris)
31
# ifndef _PATH_LASTLOG
33
# ifndef _PATH_LASTLOG
Lines 332-337 last_login_read(pam_handle_t *pamh, int Link Here
332
    return retval;
334
    return retval;
333
}
335
}
334
336
337
#ifndef __GLIBC__
338
static void logwtmp(const char * line, const char * name, const char * host)
339
{
340
    struct utmp u;
341
    memset(&u, 0, sizeof(u));
342
343
    u.ut_pid = getpid();
344
    u.ut_type = name[0] ? USER_PROCESS : DEAD_PROCESS;
345
    strncpy(u.ut_line, line, sizeof(u.ut_line));
346
    strncpy(u.ut_name, name, sizeof(u.ut_name));
347
    strncpy(u.ut_host, host, sizeof(u.ut_host));
348
    gettimeofday(&(u.ut_tv), NULL);
349
350
    updwtmp(_PATH_WTMP, &u);
351
}
352
#endif /* __GLIBC__ */
353
335
static int
354
static int
336
last_login_write(pam_handle_t *pamh, int announce, int last_fd,
355
last_login_write(pam_handle_t *pamh, int announce, int last_fd,
337
		 uid_t uid, const char *user)
356
		 uid_t uid, const char *user)
(-)Linux-PAM-1.1.6/modules/Makefile.am (-1 / +1 lines)
Lines 7-13 SUBDIRS = pam_access pam_cracklib pam_de Link Here
7
	pam_group pam_issue pam_keyinit pam_lastlog pam_limits \
7
	pam_group pam_issue pam_keyinit pam_lastlog pam_limits \
8
	pam_listfile pam_localuser pam_loginuid pam_mail \
8
	pam_listfile pam_localuser pam_loginuid pam_mail \
9
	pam_mkhomedir pam_motd pam_namespace pam_nologin \
9
	pam_mkhomedir pam_motd pam_namespace pam_nologin \
10
	pam_permit pam_pwhistory pam_rhosts pam_rootok pam_securetty \
10
	pam_permit pam_pwhistory pam_rootok pam_securetty \
11
	pam_selinux pam_sepermit pam_shells pam_stress \
11
	pam_selinux pam_sepermit pam_shells pam_stress \
12
	pam_succeed_if pam_tally pam_tally2 pam_time pam_timestamp \
12
	pam_succeed_if pam_tally pam_tally2 pam_time pam_timestamp \
13
	pam_tty_audit pam_umask \
13
	pam_tty_audit pam_umask \

Return to bug 687234