From 2ed5c56f0ff85be51552cd0d7fd83548d4d0cfe1 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Thu, 20 May 1999 04:14:52 +0000 Subject: [PATCH] add WTMPX UTMPX in paths. check for utmpx functions. --- ChangeLog | 2 ++ configure.in | 22 ++++++++++++++++++++-- paths | 2 ++ 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b92421b1..cce29d39 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ +1999-05-19 Alain Magloire * configure.in : check for ptsname(), this will give a hint to use SYSVR4 pseudo ptys handling. particularly for telnetd and rlogind. + * libinetutls/utmp_{init,logout} : new files. 1999-05-18 Alain Magloire * headers/arpa/tftp.h : changing tu_cloc to be unsigned to handle diff --git a/configure.in b/configure.in index 39a313fa..c8c4e933 100644 --- a/configure.in +++ b/configure.in @@ -138,7 +138,7 @@ AC_CHECK_HEADERS(malloc.h errno.h string.h stdarg.h termio.h termios.h \ sys/ioctl_compat.h sys/cdefs.h utmp.h utmpx.h sys/stream.h \ arpa/nameser.h sys/sockio.h sys/sysmacros.h sys/param.h \ unistd.h sys/file.h fcntl.h sys/proc.h sys/select.h \ - sys/time.h sys/wait.h sys/resource.h memory.h) + sys/time.h sys/wait.h sys/resource.h memory.h stropts.h) AC_HEADER_TIME AC_CHECK_LIB(nsl, inet_ntoa) @@ -149,7 +149,8 @@ AC_CHECK_LIB(bsd, revoke) AC_CHECK_FUNCS(cgetent uname setutent_r fpathconf tcgetattr sigvec sigaction \ flock ftruncate wait3 memcpy bcopy bzero setsid ptsname \ cfsetspeed strchr waitpid seteuid setegid setreuid setregid \ - setresuid setresgid killpg setlinebuf tzset utimes utime) + setresuid setresgid killpg setlinebuf tzset utimes utime \ + updwtmp updwtmpx) # Functions that we will define (in libinetutils) if necessary. AC_REPLACE_FUNCS(daemon strdup strcasecmp setenv memcmp memset memmove \ herror getusershell) @@ -526,6 +527,23 @@ AC_FUNC_MMAP AC_SUBST(VERSION) +# Ok were at the end of the hope, even autoconf can't help +# for example on certain system login(1) will not work if we +# don't have an entry in utmpx. +AC_CANONICAL_HOST +case "$target" in +*olaris*) + AC_DEFINE(UTMPX) + AC_DEFINE(SOLARIS) + ;; +*irix*) + AC_DEFINE(UTMPX) + ;; +*hpux*) + AC_DEFINE(UTMPX) + ;; +esac + AC_OUTPUT(Makefile libinetutils/Makefile libtelnet/Makefile glob/Makefile ftp/Makefile ftpd/Makefile inetd/Makefile rcp/Makefile rexecd/Makefile rlogin/Makefile rlogind/Makefile rsh/Makefile diff --git a/paths b/paths index ab262379..e14ff0b0 100644 --- a/paths +++ b/paths @@ -80,7 +80,9 @@ PATH_FTPUSERS $(sysconfdir)/ftpusers PATH_FTPWELCOME $(sysconfdir)/ftpwelcome PATH_INETDCONF $(sysconfdir)/inetd.conf PATH_UTMP :UTMP_FILE $(localstatedir)/run/utmp search:utmp:/var/run:/var/adm:/etc +PATH_UTMPX :UTMPX_FILE $(localstatedir)/run/utmpx search:utmpx:/var/run:/var/adm:/etc PATH_WTMP :WTMP_FILE $(localstatedir)/log/wtmp search:wtmp:/var/log:/var/adm:/etc +PATH_WTMPX :WTMPX_FILE $(localstatedir)/log/wtmpx search:wtmpx:/var/log:/var/adm:/etc PATH_LASTLOG $(localstatedir)/log/lastlog search:lastlog:/var/log:/var/adm:/etc PATH_LOG /dev/log PATH_KLOG /dev/klog no