--- /dev/null
+diff -Nur util-linux-2.9r/MCONFIG util-linux-2.9r.pld/MCONFIG
+--- util-linux-2.9r/MCONFIG Sat Mar 13 02:40:49 1999
++++ util-linux-2.9r.pld/MCONFIG Sun May 23 13:53:57 1999
+@@ -16,17 +16,17 @@
+ # If HAVE_PAM is set to "yes", then login, chfn, chsh, and newgrp
+ # will use PAM for authentication. Additionally, passwd will not be
+ # installed as it is not PAM aware.
+-HAVE_PAM=no
++HAVE_PAM=yes
+
+ # If HAVE_SHADOW is set to "yes", then login, chfn, chsh, newgrp, passwd,
+ # and vipw will not be built or installed from the login-utils
+ # subdirectory.
+-HAVE_SHADOW=yes
++HAVE_SHADOW=no
+
+ # If HAVE_PASSWD is set to "yes", then passwd will not be built or
+ # installed from the login-utils subdirectory (but login, chfn, chsh,
+ # newgrp, and vipw *will* be installed).
+-HAVE_PASSWD=no
++HAVE_PASSWD=yes
+
+ # If you use chfn and chsh from this package, REQUIRE_PASSWORD will require
+ # non-root users to enter the account password before updating /etc/passwd.
+@@ -66,7 +66,7 @@
+ USE_TTY_GROUP=yes
+
+ # If HAVE_OPENPTY is set to "yes", then script will use the Unix98 ptys
+-HAVE_OPENPTY=no
++HAVE_OPENPTY=yes
+
+ # If HAVE_RESET is set to "yes", then reset won't be installed. The version
+ # of reset that comes with the ncurses package is less aggressive.
+@@ -75,7 +75,7 @@
+ # If HAVE_SLN is set to "yes", then sln won't be installed
+ # (but the man page sln.8 will be installed anyway).
+ # sln also comes with libc and glibc.
+-HAVE_SLN=no
++HAVE_SLN=yes
+
+ CC= gcc
+
+@@ -114,7 +114,7 @@
+ # SLANGFLAGS=-I/usr/include/slang
+ # No such subdirectory - slcurses.h lives in /usr/include
+ # (no extra definition required).
+-LIBSLANG=-lslang
++# LIBSLANG=-lslang
+
+
+ DEVDIR= $(DESTDIR)/dev
+@@ -127,13 +127,13 @@
+ BINDIR= $(DESTDIR)/bin
+ VARPATH= $(DESTDIR)/var
+ LOGDIR= $(DESTDIR)/var/log
+-MANDIR= $(DESTDIR)/usr/man
++MANDIR= $(DESTDIR)/usr/share/man
+ MAN1DIR= $(MANDIR)/man1
+ MAN3DIR= $(MANDIR)/man3
+ MAN5DIR= $(MANDIR)/man5
+ MAN6DIR= $(MANDIR)/man6
+ MAN8DIR= $(MANDIR)/man8
+-INFODIR= $(DESTDIR)/usr/info
++INFODIR= $(DESTDIR)/usr/share/info
+
+ # Directory for shutdown, halt, reboot, etc.
+ SHUTDOWNDIR= $(SBINDIR)
+@@ -150,7 +150,7 @@
+ MANMODE= 644
+ DATMODE= 644
+ INFOMODE= 644
+-SUIDMODE= 4755
++SUIDMODE= 4711
+
+ CHMOD= chmod
+ INSTALL= install
+@@ -158,7 +158,7 @@
+ INSTALLBIN= $(INSTALL) -m $(BINMODE)
+ INSTALLMAN= $(INSTALL) -m $(MANMODE)
+ INSTALLDAT= $(INSTALL) -m $(DATMODE)
+-INSTALLSUID= $(INSTALL) -m $(SUIDMODE) -o root
++INSTALLSUID= $(INSTALL) -m $(SUIDMODE)
+
+ %.o: %.c
+ $(CC) -c $(CFLAGS) $< -o $@
--- /dev/null
+diff -Nur util-linux-2.9r/fdisk/fdisk.c util-linux-2.9r.pld/fdisk/fdisk.c
+--- util-linux-2.9r/fdisk/fdisk.c Sat May 1 13:49:47 1999
++++ util-linux-2.9r.pld/fdisk/fdisk.c Sun May 23 13:47:46 1999
+@@ -2002,8 +2002,12 @@
+ printf(_("Boot file unchanged\n"));
+ else
+ sgi_set_bootfile(line_ptr);
+- } else
+- bselect();
++ } else {
++ printf("Warning: starting partitions at cylinder 1"
++ " will be bad for the health of your\n");
++ printf("partition table -- start at cylinder 2 instead!\n\n");
++ bselect();
++ }
+ break;
+ case 'c':
+ if (sun_label)
--- /dev/null
+diff -Nur util-linux-2.9r/login-utils/login.c util-linux-2.9r.pld/login-utils/login.c
+--- util-linux-2.9r/login-utils/login.c Sun May 2 04:16:35 1999
++++ util-linux-2.9r.pld/login-utils/login.c Sun May 23 13:49:11 1999
+@@ -154,7 +154,7 @@
+
+ #define SLEEP_EXIT_TIMEOUT 5
+
+-#ifdef __linux__
++#ifndef __linux__ /* sami se qrna masakrujcie logi -- ³obuzy jedne */
+ #define DO_PS_FIDDLING
+ #endif
+
+@@ -272,6 +272,41 @@
+ 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 */
++
+
+ int
+ main(int argc, char **argv)
+@@ -457,8 +492,6 @@
+ else
+ tty = ttyn;
+
+- openlog("login", LOG_ODELAY, LOG_AUTHPRIV);
+-
+ #if 0
+ /* other than iso-8859-1 */
+ printf("\033(K");
+@@ -516,7 +549,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 +559,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 +598,12 @@
+ retcode = pam_open_session(pamh, 0);
+ PAM_FAIL_CHECK;
+
++ openlog("login", LOG_ODELAY, LOG_AUTHPRIV);
++
+ #else /* ! USE_PAM */
+
++ openlog("login", LOG_ODELAY, LOG_AUTHPRIV);
++
+ for (cnt = 0;; ask = 1) {
+ # ifndef __linux__
+ ioctlval = 0;
+@@ -838,6 +879,20 @@
+ && utp->ut_type >= INIT_PROCESS
+ && utp->ut_type <= DEAD_PROCESS)
+ break;
++
++ /*
++ * XXX If we can't find a pre-existing entry by pid, try by line
++ * XXX BSD network daemons may rely on this.
++ */
++ if (utp == NULL) {
++ endutent();
++ setutent();
++ memset(&ut, 0, sizeof(ut));
++ ut.ut_type = LOGIN_PROCESS; /* XXX doesn't matter */
++ strncpy(ut.ut_id, ttyn + 8, sizeof(ut.ut_id));
++ strncpy(ut.ut_line, ttyn + 5, sizeof(ut.ut_line));
++ utp = getutid(&ut);
++ }
+
+ if (utp) {
+ memcpy(&ut, utp, sizeof(ut));
+@@ -848,14 +903,19 @@
+ /* endutent(); superfluous, error for glibc */
+
+ if (ut.ut_id[0] == 0)
+- strncpy(ut.ut_id, ttyn + 8, sizeof(ut.ut_id));
++ strncpy(ut.ut_id, ttyn + 8, sizeof(ut.ut_id));
+
+ strncpy(ut.ut_user, username, sizeof(ut.ut_user));
+ strncpy(ut.ut_line, ttyn + 5, sizeof(ut.ut_line));
+ ut.ut_line[sizeof(ut.ut_line)-1] = 0;
+- time(&t);
++
++#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 */
+- /* (we might test #ifdef _HAVE_UT_TV ) */
++#endif
++
+ ut.ut_type = USER_PROCESS;
+ ut.ut_pid = mypid;
+ if (hostname) {
+@@ -1068,6 +1128,8 @@
+ #endif
+ signal(SIGINT, SIG_DFL);
+
++ openlog("login", LOG_ODELAY, LOG_AUTHPRIV);
++
+ /* 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"));
--- /dev/null
+diff -Nur util-linux-2.9r/text-utils/more.c util-linux-2.9r.pld/text-utils/more.c
+--- util-linux-2.9r/text-utils/more.c Sat Mar 20 21:20:18 1999
++++ util-linux-2.9r.pld/text-utils/more.c Sun May 23 13:47:46 1999
+@@ -138,7 +138,7 @@
+ char *shell; /* The name of the shell to use */
+ int shellp; /* A previous shell command exists */
+ char ch;
+-jmp_buf restore;
++sigjmp_buf restore;
+ char Line[LINSIZ]; /* Line buffer */
+ int Lpp = 24; /* lines per page */
+ char *Clear; /* clear screen */
+@@ -151,7 +151,6 @@
+ char *cursorm; /* cursor movement */
+ char cursorhome[40]; /* contains cursor movement to home */
+ char *EodClr; /* clear rest of screen */
+-char *tgetstr();
+ int Mcol = 80; /* number of columns */
+ int Wrap = 1; /* set if automargins */
+ int soglitch; /* terminal has standout mode glitch */
+@@ -159,6 +158,9 @@
+ int pstate = 0; /* current UL state */
+ char *getenv();
+ static int magic();
++char termbuffer[2048];
++char tcbuffer[2048];
++char * strbuf = termbuffer;
+ struct {
+ long chrctr, line;
+ } context, screen_start;
+@@ -297,7 +299,7 @@
+ if ((f = checkf (fnames[fnum], &clearit)) != NULL) {
+ context.line = context.chrctr = 0;
+ Currline = 0;
+- if (firstf) setjmp (restore);
++ if (firstf) sigsetjmp (restore, 1);
+ if (firstf) {
+ firstf = 0;
+ if (srchopt) {
+@@ -309,7 +311,7 @@
+ skiplns (initline, f);
+ }
+ else if (fnum < nfiles && !no_tty) {
+- setjmp (restore);
++ sigsetjmp (restore, 1);
+ left = command (fnames[fnum], f);
+ }
+ if (left != 0) {
+@@ -343,7 +345,7 @@
+ within = 0;
+ }
+ }
+- setjmp (restore);
++ sigsetjmp (restore, 1);
+ fflush(stdout);
+ fclose(f);
+ screen_start.line = screen_start.chrctr = 0L;
+@@ -514,7 +516,7 @@
+ num_lines--;
+ }
+ if (pstate) {
+- putp (ULexit);
++ tputs (ULexit, 1, putchar);
+ pstate = 0;
+ }
+ fflush(stdout);
+@@ -528,7 +530,7 @@
+ if (Pause && clreol)
+ clreos ();
+ Ungetc (c, f);
+- setjmp (restore);
++ sigsetjmp (restore, 1);
+ Pause = 0; startup = 0;
+ if ((num_lines = command (NULL, f)) == 0)
+ return;
+@@ -557,7 +559,7 @@
+ putchar ('\n');
+ if (!startup) {
+ signal(SIGQUIT, onquit);
+- longjmp (restore, 1);
++ siglongjmp (restore, 1);
+ }
+ else
+ Pause++;
+@@ -744,7 +746,7 @@
+ if (!hard) {
+ promptlen = 8;
+ if (Senter && Sexit) {
+- putp (Senter);
++ tputs (Senter, 1, putchar);
+ promptlen += (2 * soglitch);
+ }
+ if (clreol)
+@@ -760,7 +762,7 @@
+ promptlen += pr(_("[Press space to continue, 'q' to quit.]"));
+ }
+ if (Senter && Sexit)
+- putp (Sexit);
++ tputs (Sexit, 1, putchar);
+ if (clreol)
+ clreos ();
+ fflush(stdout);
+@@ -807,7 +809,7 @@
+ if (!hardtabs || (column < promptlen && !hard)) {
+ if (hardtabs && eraseln && !dumb) {
+ column = 1 + (column | 7);
+- putp (eraseln);
++ tputs (eraseln, 1, putchar);
+ promptlen = 0;
+ }
+ else {
+@@ -876,7 +878,7 @@
+ if (col == 0)
+ putchar ('\r');
+ if (!dumb && eraseln)
+- putp (eraseln);
++ tputs (eraseln, 1, putchar);
+ else
+ for (col = promptlen - col; col > 0; col--)
+ putchar (' ');
+@@ -900,12 +902,12 @@
+ */
+ void cleareol()
+ {
+- putp(eraseln);
++ tputs(eraseln, 1, putchar);
+ }
+
+ void clreos()
+ {
+- putp(EodClr);
++ tputs(EodClr, 1, putchar);
+ }
+
+ /*
+@@ -949,13 +951,13 @@
+ if (c == ' ' && state == 0 && ulglitch && wouldul(s, n-1))
+ state = 1;
+ else
+- putp(state ? ULenter : ULexit);
++ tputs(state ? ULenter : ULexit, 1, putchar);
+ }
+ if (c != ' ' || pstate == 0 || state != 0 || ulglitch == 0)
+ putchar(c);
+ if (state && *chUL) {
+ pr(chBS);
+- putp(chUL);
++ tputs(chUL, 1, putchar);
+ }
+ pstate = state;
+ }
+@@ -968,7 +970,7 @@
+ doclear()
+ {
+ if (Clear && !hard) {
+- putp(Clear);
++ tputs(Clear, 1, putchar);
+
+ /* Put out carriage return so that system doesn't
+ ** get confused by escape sequences when expanding tabs
+@@ -984,7 +986,7 @@
+ void
+ home()
+ {
+- putp(Home);
++ tputs(Home, 1, putchar);
+ }
+
+ static int lastcmd, lastarg, lastp;
+@@ -1200,9 +1202,9 @@
+ if (dum_opt) {
+ kill_line ();
+ if (Senter && Sexit) {
+- putp (Senter);
++ tputs (Senter, 1, putchar);
+ promptlen = pr (_("[Press 'h' for instructions.]")) + (2 * soglitch);
+- putp (Sexit);
++ tputs (Sexit, 1, putchar);
+ }
+ else
+ promptlen = pr (_("[Press 'h' for instructions.]"));
+@@ -1569,7 +1571,7 @@
+ if ((term = getenv("TERM")) == 0) {
+ dumb++; ul_opt = 0;
+ }
+- setupterm(term, 1, &ret);
++ ret = tgetent(tcbuffer, getenv("TERM"));
+ if (ret <= 0) {
+ dumb++; ul_opt = 0;
+ }
+@@ -1577,35 +1579,35 @@
+ #ifdef TIOCGWINSZ
+ if (ioctl(fileno(stdout), TIOCGWINSZ, &win) < 0) {
+ #endif
+- Lpp = tigetnum("lines");
+- Mcol = tigetnum("cols");
++ Lpp = tgetnum("li");
++ Mcol = tgetnum("co");
+ #ifdef TIOCGWINSZ
+ } else {
+ if ((Lpp = win.ws_row) == 0)
+- Lpp = tigetnum("lines");
++ Lpp = tgetnum("li");
+ if ((Mcol = win.ws_col) == 0)
+- Mcol = tigetnum("cols");
++ Mcol = tgetnum("co");
+ }
+ #endif
+- if ((Lpp <= 0) || tigetflag("hc")) {
++ if ((Lpp <= 0) || tgetflag("hc")) {
+ hard++; /* Hard copy terminal */
+ Lpp = 24;
+ }
+
+- if (tigetflag("xenl"))
++ if (tgetflag("xn"))
+ eatnl++; /* Eat newline at last column + 1; dec, concept */
+ if (Mcol <= 0)
+ Mcol = 80;
+
+ if (tailequ (fnames[0], "page"))
+ noscroll++;
+- Wrap = tigetflag("am");
+- bad_so = tigetflag ("xhp");
+- eraseln = tigetstr("el");
+- Clear = tigetstr("clear");
+- Senter = tigetstr("smso");
+- Sexit = tigetstr("rmso");
+- if ((soglitch = tigetnum("xmc")) < 0)
++ Wrap = tgetflag("am");
++ bad_so = tgetflag ("xs");
++ eraseln = tgetstr("ce", &strbuf);
++ Clear = tgetstr("cl", &strbuf);
++ Senter = tgetstr("co", &strbuf);
++ Sexit = tgetstr("se", &strbuf);
++ if ((soglitch = tgetnum("sg")) < 0)
+ soglitch = 0;
+
+ /*
+@@ -1616,12 +1618,12 @@
+ * isn't available, settle for standout sequence.
+ */
+
+- if (tigetflag("ul") || tigetflag("os"))
++ if (tgetflag("ul") || tgetflag("os"))
+ ul_opt = 0;
+- if ((chUL = tigetstr("uc")) == NULL )
++ if ((chUL = tgetstr("uc", &strbuf)) == NULL )
+ chUL = "";
+- if (((ULenter = tigetstr("smul")) == NULL ||
+- (ULexit = tigetstr("rmul")) == NULL) && !*chUL) {
++ if (((ULenter = tgetstr("us", &strbuf)) == NULL ||
++ (ULexit = tgetstr("ue", &strbuf)) == NULL) && !*chUL) {
+ if ((ULenter = Senter) == NULL || (ULexit = Sexit) == NULL) {
+ ULenter = "";
+ ULexit = "";
+@@ -1631,20 +1633,20 @@
+ ulglitch = 0;
+ }
+
+- if ((padstr = tigetstr("pad")) != NULL)
++ if ((padstr = tgetstr("pc", &strbuf)) != NULL)
+ PC = *padstr;
+- Home = tigetstr("home");
++ Home = tgetstr("ho", &strbuf);
+ if (Home == 0 || *Home == '\0')
+ {
+- if ((cursorm = tigetstr("cup")) != NULL) {
+- const char *t = (const char *)tparm(cursorm, 0, 0);
++ if ((cursorm = tgetstr("cm", &strbuf)) != NULL) {
++ const char *t = (const char *)tgoto(cursorm, 0, 0);
+ strncpy(cursorhome, t, sizeof(cursorhome));
+ cursorhome[sizeof(cursorhome)-1] = 0;
+ Home = cursorhome;
+ }
+ }
+- EodClr = tigetstr("ed");
+- if ((chBS = tigetstr("cub1")) == NULL)
++ EodClr = tgetstr("cd", &strbuf);
++ if ((chBS = tgetstr("le", &strbuf)) == NULL)
+ chBS = "\b";
+
+ }
+@@ -1716,7 +1718,7 @@
+ }
+ else {
+ if (!eraseln) promptlen = maxlen;
+- longjmp (restore, 1);
++ siglongjmp (restore, 1);
+ }
+ }
+ else if ((ch == otty.c_cc[VKILL]) && !slash) {
+@@ -1857,15 +1859,15 @@
+ kill_line ();
+ promptlen += strlen (mess);
+ if (Senter && Sexit) {
+- putp (Senter);
++ tputs (Senter, 1, putchar);
+ pr(mess);
+- putp (Sexit);
++ tputs (Sexit, 1, putchar);
+ }
+ else
+ pr (mess);
+ fflush(stdout);
+ errors++;
+- longjmp (restore, 1);
++ siglongjmp (restore, 1);
+ }
+
+
+@@ -1937,5 +1939,5 @@
+ signal (SIGTSTP, onsusp);
+ set_tty ();
+ if (inwait)
+- longjmp (restore, 1);
++ siglongjmp (restore, 1);
+ }