+1998-05-26 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * login.c (dolastlog): BSD 4.4 systems don't have lastlog.h, but
+ still define struct lastlog somewhere. Included from Dima
+ Ruban's FreeBSD patches.
+
+ * krlogin.c: Include sys/ioctl_compat.h if it is present (instead
+ of just for 386BSD).
+
+ * loginpaths.h (LPATH): If the OS provides _PATH_DEFPATH, use it
+ to define LPATH and RPATH.
+
+ * login.c: #include paths.h if present, and use it to set the
+ pathnames for certain common files.
+
+ * configure.in (withval): Check for <sys/ioctl_compat.h> and
+ <paths.h>
+
Sat May 16 16:07:42 1998 Tom Yu <tlyu@mit.edu>
* login.c: Replace strcpy with strncpy in places. Add nul
AC_VFORK
AC_TYPE_MODE_T
AC_CHECK_FUNCS(isatty inet_aton gettosbyname killpg initgroups setpriority setreuid setresuid waitpid setsid ptsname setlogin tcgetpgrp tcsetpgrp setpgid strsave utimes)
-AC_CHECK_HEADERS(unistd.h stdlib.h string.h sys/filio.h sys/sockio.h sys/label.h sys/tty.h ttyent.h lastlog.h sys/select.h sys/ptyvar.h utmp.h sys/time.h krb4-proto.h)
+AC_CHECK_HEADERS(unistd.h stdlib.h string.h sys/filio.h sys/sockio.h sys/label.h sys/tty.h ttyent.h lastlog.h sys/select.h sys/ptyvar.h utmp.h sys/time.h krb4-proto.h sys/ioctl_compat.h paths.h)
AC_HEADER_STDARG
AC_REPLACE_FUNCS(getdtablesize)
KRB5_SIGTYPE
#endif
#endif
+#ifdef HAVE_PATHS_H
+#include <paths.h>
+#endif
+
#include "loginpaths.h"
#ifdef POSIX_TERMIOS
#define TTYGRPNAME "tty" /* name of group to own ttys */
+#if defined(_PATH_MAILDIR)
+#define MAILDIR _PATH_MAILDIR
+#else
+#define MAILDIR "/usr/spool/mail"
+#endif
+#if defined(_PATH_NOLOGIN)
+#define NOLOGIN _PATH_NOLOGIN
+#else
+#define NOLOGIN "/etc/nologin"
+#endif
+#if defined(_PATH_LASTLOG)
+#define LASTLOG _PATH_LASTLOG
+#else
+#define LASTLOG "/usr/adm/lastlog"
+#endif
+#if defined(_PATH_BSHELL)
+#define BSHELL _PATH_BSHELL
+#else
+#define BSHELL "/bin/sh"
+#endif
+
+#if (defined(BSD) && (BSD >= 199103)) /* no /usr/ucb */
+#define QUOTAWARN "/usr/bin/quota"
+#endif
+
#define MOTDFILE "/etc/motd"
-#define MAILDIR "/usr/spool/mail"
-#define NOLOGIN "/etc/nologin"
#define HUSHLOGIN ".hushlogin"
-#define LASTLOG "/usr/adm/lastlog"
-#define BSHELL "/bin/sh"
#if !defined(OQUOTA) && !defined(QUOTAWARN)
#define QUOTAWARN "/usr/ucb/quota" /* warn user about quotas */
if (pwd == NULL || pwd->pw_uid)
checknologin();
-
/*
* Allows automatic login by root.
* If not invoked by root, disallow if the uid's differ.
int quiet;
char *tty;
{
-#ifdef HAVE_LASTLOG_H
+#if defined(HAVE_LASTLOG_H) || (defined(BSD) && (BSD >= 199103))
struct lastlog ll;
int fd;