summaryrefslogtreecommitdiff
path: root/login.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-05-17 22:00:02 +1000
committerDamien Miller <djm@mindrot.org>2000-05-17 22:00:02 +1000
commitd2c208a2d37104c5c429659ac708d6288400ecd2 (patch)
tree595741836a9444811c123b6555c1d47f5def2a95 /login.c
parent8d1fd57a971159c828ab778136ca6332f0ba8f34 (diff)
- Applied Tom Bertelson's <tbert@abac.com> AIX authentication fix
Diffstat (limited to 'login.c')
-rw-r--r--login.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/login.c b/login.c
index 0d874cc71..49853bdc2 100644
--- a/login.c
+++ b/login.c
@@ -18,7 +18,7 @@
18 */ 18 */
19 19
20#include "includes.h" 20#include "includes.h"
21RCSID("$Id: login.c,v 1.26 2000/05/17 11:34:08 damien Exp $"); 21RCSID("$Id: login.c,v 1.27 2000/05/17 12:00:03 damien Exp $");
22 22
23#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX) 23#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX)
24# include <utmpx.h> 24# include <utmpx.h>
@@ -53,6 +53,10 @@ unsigned long
53get_last_login_time(uid_t uid, const char *logname, 53get_last_login_time(uid_t uid, const char *logname,
54 char *buf, unsigned int bufsize) 54 char *buf, unsigned int bufsize)
55{ 55{
56#if defined(WITH_AIXAUTHENTICATE)
57 /* This is done in do_authentication */
58 return (unsigned long) 0;
59#else
56#if defined(_PATH_LASTLOG) && !defined(DISABLE_LASTLOG) 60#if defined(_PATH_LASTLOG) && !defined(DISABLE_LASTLOG)
57 struct lastlog ll; 61 struct lastlog ll;
58 char *lastlog; 62 char *lastlog;
@@ -132,6 +136,7 @@ get_last_login_time(uid_t uid, const char *logname,
132 return 0; 136 return 0;
133# endif /* HAVE_TYPE_IN_UTMP */ 137# endif /* HAVE_TYPE_IN_UTMP */
134#endif /* defined(_PATH_LASTLOG) && !defined(DISABLE_LASTLOG) */ 138#endif /* defined(_PATH_LASTLOG) && !defined(DISABLE_LASTLOG) */
139#endif /* defined(WITH_AIXAUTHENTICATE) */
135} 140}
136 141
137/* 142/*
@@ -246,7 +251,8 @@ record_login(pid_t pid, const char *ttyname, const char *user, uid_t uid,
246 login(&u); 251 login(&u);
247#endif /* defined(HAVE_UTMPX_H) && defined(USE_UTMPX) */ 252#endif /* defined(HAVE_UTMPX_H) && defined(USE_UTMPX) */
248 253
249#if defined(_PATH_LASTLOG) && !defined(DISABLE_LASTLOG) 254#if defined(_PATH_LASTLOG) && !defined(DISABLE_LASTLOG) && !defined(WITH_AIXAUTHENTICATE)
255 /* AIX does this in do_authentication */
250 lastlog = _PATH_LASTLOG; 256 lastlog = _PATH_LASTLOG;
251 257
252 /* Update lastlog unless actually recording a logout. */ 258 /* Update lastlog unless actually recording a logout. */
@@ -276,7 +282,7 @@ record_login(pid_t pid, const char *ttyname, const char *user, uid_t uid,
276 close(fd); 282 close(fd);
277 } 283 }
278 } 284 }
279#endif /* defined(_PATH_LASTLOG) && !defined(DISABLE_LASTLOG) */ 285#endif /* defined(_PATH_LASTLOG) && !defined(DISABLE_LASTLOG) && !defined(WITH_AIXAUTHENTICATE) */
280} 286}
281 287
282/* Records that the user has logged out. */ 288/* Records that the user has logged out. */