-diff -Nur util-linux-2.9s/lib/pathnames.h util-linux-2.9s.pld/lib/pathnames.h
---- util-linux-2.9s/lib/pathnames.h Fri Jun 11 08:18:28 1999
-+++ util-linux-2.9s.pld/lib/pathnames.h Fri Jun 11 08:16:50 1999
-@@ -70,7 +70,7 @@
- #define SECURETTY "/etc/securetty"
- #define _PATH_UTMP "/var/run/utmpx"
- #define _PATH_WTMP LOGDIR "/wtmpx"
--#define _PATH_WTMPLOCK "/var/lock/wtmpxlock"
-+#define _PATH_WTMPLOCK "/var/lock/wtmxplock"
-
- /* no more . in DEFPATH */
- #define _PATH_DEFPATH "/usr/local/bin:/bin:/usr/bin"
-diff -Nur util-linux-2.9s/login-utils/login.c util-linux-2.9s.pld/login-utils/login.c
---- util-linux-2.9s/login-utils/login.c Fri May 28 11:49:46 1999
-+++ util-linux-2.9s.pld/login-utils/login.c Fri Jun 11 08:16:50 1999
-@@ -154,7 +154,7 @@
+diff -urN util-linux-2.11d.org/login-utils/login.c util-linux-2.11d/login-utils/login.c
+--- util-linux-2.11d.org/login-utils/login.c Sun May 20 22:27:44 2001
++++ util-linux-2.11d/login-utils/login.c Sun Jun 3 21:49:55 2001
+@@ -156,7 +156,7 @@
#define SLEEP_EXIT_TIMEOUT 5
#define DO_PS_FIDDLING
#endif
-@@ -272,6 +272,40 @@
- return 0;
- }
-
-+#if USE_PAM
-+#define _PATH_BTMPX "/var/log/btmpx"
-+static void logbtmp(const char *line, const char *username, const char *hostname)
-+{
-+ struct utmp ut;
-+
-+ memset(&ut, 0, sizeof(ut));
-+
-+ strncpy(ut.ut_user, username, sizeof(ut.ut_user));
-+
-+ strncpy(ut.ut_id, line + 3, sizeof(ut.ut_id));
-+ strncpy(ut.ut_line, line, sizeof(ut.ut_line));
-+ ut.ut_line[sizeof(ut.ut_line)-1] = 0;
-+
-+#if defined(_HAVE_UT_TV)
-+ gettimeofday(&ut.ut_tv, NULL);
-+#else
-+ time(&t) ;
-+ ut.ut_time = t; /* ut_time is not always a time_t */
-+#endif
-+
-+ ut.ut_type = LOGIN_PROCESS; /* XXX doesn't matter */
-+ ut.ut_pid = getpid();
-+ if (hostname) {
-+ strncpy(ut.ut_host, hostname, sizeof(ut.ut_host));
-+ ut.ut_host[sizeof(ut.ut_host)-1] = 0;
-+ if (hostaddress.h_addr_list)
-+ memcpy(&ut.ut_addr, hostaddress.h_addr_list[0],
-+ sizeof(ut.ut_addr));
-+ }
-+
-+ updwtmp(_PATH_BTMPX, &ut);
-+}
-+#endif /* USE_PAM */
+@@ -515,8 +515,6 @@
+ tcsetattr(0,TCSAFLUSH,&tt);
+ }
- int
- main(int argc, char **argv)
-@@ -457,8 +491,6 @@
- else
- tty = ttyn;
-
- openlog("login", LOG_ODELAY, LOG_AUTHPRIV);
-
#if 0
/* other than iso-8859-1 */
printf("\033(K");
-@@ -516,7 +548,8 @@
- (retcode == PAM_AUTHINFO_UNAVAIL))) {
- pam_get_item(pamh, PAM_USER, (const void **) &username);
- syslog(LOG_NOTICE,_("FAILED LOGIN %d FROM %s FOR %s, %s"),
-- failcount, hostname, username, pam_strerror(pamh, retcode));
-+ failcount, hostname, username, pam_strerror(pamh, retcode));
-+ logbtmp(ttyn + 5, username, hostname);
- fprintf(stderr,_("Login incorrect\n\n"));
- pam_set_item(pamh,PAM_USER,NULL);
- retcode = pam_authenticate(pamh, 0);
-@@ -525,13 +558,16 @@
- if (retcode != PAM_SUCCESS) {
- pam_get_item(pamh, PAM_USER, (const void **) &username);
-
-- if (retcode == PAM_MAXTRIES)
-+ if (retcode == PAM_MAXTRIES) {
- syslog(LOG_NOTICE,_("TOO MANY LOGIN TRIES (%d) FROM %s FOR "
- "%s, %s"), failcount, hostname, username,
- pam_strerror(pamh, retcode));
-- else
-+ logbtmp(ttyn + 5, username, hostname);
-+ } else {
- syslog(LOG_NOTICE,_("FAILED LOGIN SESSION FROM %s FOR %s, %s"),
- hostname, username, pam_strerror(pamh, retcode));
-+ logbtmp(ttyn + 5, username, hostname);
-+ }
-
- fprintf(stderr,_("\nLogin incorrect\n"));
- pam_end(pamh, retcode);
-@@ -561,8 +597,12 @@
- retcode = pam_open_session(pamh, 0);
+@@ -646,8 +644,12 @@
+ retcode = pam_setcred(pamh, PAM_ESTABLISH_CRED);
PAM_FAIL_CHECK;
+ openlog("login", LOG_ODELAY, LOG_AUTHPRIV);
for (cnt = 0;; ask = 1) {
# ifndef __linux__
ioctlval = 0;
-@@ -842,7 +882,9 @@
+@@ -866,7 +868,9 @@
/* If we can't find a pre-existing entry by pid, try by line.
BSD network daemons may rely on this. (anonymous) */
if (utp == NULL) {
+ setutent();
+ memset(&ut, 0, sizeof(ut));
ut.ut_type = LOGIN_PROCESS;
- strncpy(ut.ut_id, ttyn + 8, sizeof(ut.ut_id));
- strncpy(ut.ut_line, ttyn + 5, sizeof(ut.ut_line));
-@@ -1081,6 +1123,8 @@
+ strncpy(ut.ut_id, tty_number, sizeof(ut.ut_id));
+ strncpy(ut.ut_line, tty_name, sizeof(ut.ut_line));
+@@ -1103,6 +1107,8 @@
#endif
signal(SIGINT, SIG_DFL);
/* discard permissions last so can't get killed and drop core */
if(setuid(pwd->pw_uid) < 0 && pwd->pw_uid) {
syslog(LOG_ALERT, _("setuid() failed"));
-diff -Nur util-linux-2.9s/text-utils/Makefile util-linux-2.9s.pld/text-utils/Makefile
---- util-linux-2.9s/text-utils/Makefile Fri Jun 11 08:18:28 1999
-+++ util-linux-2.9s.pld/text-utils/Makefile Fri Jun 11 08:16:50 1999
-@@ -20,7 +20,7 @@
-
- # Where to put datebase files?
-
--DATAMISC= more.help
-+USRLIB= more.help
-
- all: $(BIN) $(USRBIN)
-
-@@ -68,10 +68,10 @@
- endif
-
- install install.shadow install.text-utils: all
-- $(INSTALLDIR) $(BINDIR) $(USRBINDIR) $(DATAMISCDIR) $(MAN1DIR)
-+ $(INSTALLDIR) $(BINDIR) $(USRBINDIR) $(USRLIBDIR) $(MAN1DIR)
- $(INSTALLBIN) $(BIN) $(BINDIR)
- $(INSTALLBIN) $(USRBIN) $(USRBINDIR)
-- $(INSTALLDAT) $(DATAMISC) $(DATAMISCDIR)
-+ $(INSTALLDAT) $(USRLIB) $(USRLIBDIR)
- $(INSTALLMAN) $(MAN1) $(MAN1DIR)
-
- .PHONY: clean distclean