_PATH_UTMP if defined to determine location of the wtmp and utmp
files.
configure.in: Add check for utmp.h
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10592
dc483132-0cff-0310-8789-
dd5450dbe970
+1998-05-26 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * sys_term.c: #include utmp.h if present, and use _PATH_WTMP and
+ _PATH_UTMP if defined to determine location of the wtmp
+ and utmp files.
+
+ * configure.in: Add check for utmp.h
+
1998-05-06 Theodore Ts'o <tytso@rsts-11.mit.edu>
* telnetd.c (main):
fi
fi
AC_HEADER_TIME
-AC_CHECK_HEADERS(string.h arpa/nameser.h sys/time.h sys/tty.h sac.h sys/ptyvar.h sys/filio.h sys/stream.h)
+AC_CHECK_HEADERS(string.h arpa/nameser.h utmp.h sys/time.h sys/tty.h sac.h sys/ptyvar.h sys/filio.h sys/stream.h)
AC_CHECK_FUNCS(gettosbyname)
dnl Make our operating system-specific security checks and definitions for
dnl login.
int utmp_len = MAXHOSTNAMELEN; /* sizeof(init_request.host) */
#else /* NEWINIT*/
+#ifdef HAVE_UTMP_H
+#include <utmp.h>
+#endif
+
+#ifdef _PATH_WTMP
+char wtmpf[] = _PATH_WTMP;
+#else
char wtmpf[] = "/usr/adm/wtmp";
-char utmpf[] = "/etc/utmp";
+#endif
+#ifdef _PATH_UTMP
+char utmpf[] = _PATH_UTMP;
+#else
+char utmpf[] = "/etc/utmp";
+#endif
+
# ifdef CRAY
#include <tmpdir.h>
#include <sys/wait.h>