diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2013-07-27 08:58:37 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2013-07-27 08:58:37 +0400 |
commit | ea839a52aebd6a29a8dde70412b0e7b8d68568b4 (patch) | |
tree | 10026e84c8b73d4e5ad6704ab1cb78ea7c63c305 /libmisc/utmp.c | |
parent | 6c1662a897fd34b5b0b0174ab83552b016d05e8d (diff) | |
download | shadow-upstream/4.1.5.1.tar.gz |
Imported Upstream version 4.1.5.1upstream/4.1.5.1upstream
Diffstat (limited to 'libmisc/utmp.c')
-rw-r--r-- | libmisc/utmp.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libmisc/utmp.c b/libmisc/utmp.c index 437c3d5..43bac47 100644 --- a/libmisc/utmp.c +++ b/libmisc/utmp.c @@ -45,7 +45,7 @@ #include <netdb.h> #include <stdio.h> -#ident "$Id: utmp.c 3064 2009-09-07 19:50:00Z nekral-guest $" +#ident "$Id: utmp.c 3720 2012-05-18 17:57:52Z nekral-guest $" /* @@ -129,6 +129,7 @@ static bool is_my_tty (const char *tty) return ret; } +#ifndef USE_PAM /* * Some systems already have updwtmp() and possibly updwtmpx(). Others * don't, so we re-implement these functions if necessary. @@ -160,6 +161,7 @@ static void updwtmpx (const char *filename, const struct utmpx *utx) } #endif /* ! HAVE_UPDWTMPX */ #endif /* ! USE_UTMPX */ +#endif /* ! USE_PAM */ /* @@ -313,7 +315,10 @@ int setutmp (struct utmp *ut) } endutent (); +#ifndef USE_PAM + /* This is done by pam_lastlog */ updwtmp (_WTMP_FILE, ut); +#endif /* ! USE_PAM */ return err; } @@ -446,7 +451,10 @@ int setutmpx (struct utmpx *utx) } endutxent (); +#ifndef USE_PAM + /* This is done by pam_lastlog */ updwtmpx (_WTMP_FILE "x", utx); +#endif /* ! USE_PAM */ return err; } |