summaryrefslogtreecommitdiffstats
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 0d874cc7..49853bdc 100644
--- a/login.c
+++ b/login.c
@@ -18,7 +18,7 @@
*/
#include "includes.h"
-RCSID("$Id: login.c,v 1.26 2000/05/17 11:34:08 damien Exp $");
+RCSID("$Id: login.c,v 1.27 2000/05/17 12:00:03 damien Exp $");
#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX)
# include <utmpx.h>
@@ -53,6 +53,10 @@ unsigned long
get_last_login_time(uid_t uid, const char *logname,
char *buf, unsigned int bufsize)
{
+#if defined(WITH_AIXAUTHENTICATE)
+ /* This is done in do_authentication */
+ return (unsigned long) 0;
+#else
#if defined(_PATH_LASTLOG) && !defined(DISABLE_LASTLOG)
struct lastlog ll;
char *lastlog;
@@ -132,6 +136,7 @@ get_last_login_time(uid_t uid, const char *logname,
return 0;
# endif /* HAVE_TYPE_IN_UTMP */
#endif /* defined(_PATH_LASTLOG) && !defined(DISABLE_LASTLOG) */
+#endif /* defined(WITH_AIXAUTHENTICATE) */
}
/*
@@ -246,7 +251,8 @@ record_login(pid_t pid, const char *ttyname, const char *user, uid_t uid,
login(&u);
#endif /* defined(HAVE_UTMPX_H) && defined(USE_UTMPX) */
-#if defined(_PATH_LASTLOG) && !defined(DISABLE_LASTLOG)
+#if defined(_PATH_LASTLOG) && !defined(DISABLE_LASTLOG) && !defined(WITH_AIXAUTHENTICATE)
+ /* AIX does this in do_authentication */
lastlog = _PATH_LASTLOG;
/* 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,
close(fd);
}
}
-#endif /* defined(_PATH_LASTLOG) && !defined(DISABLE_LASTLOG) */
+#endif /* defined(_PATH_LASTLOG) && !defined(DISABLE_LASTLOG) && !defined(WITH_AIXAUTHENTICATE) */
}
/* Records that the user has logged out. */