diff options
author | Ken Raeburn <raeburn@mit.edu> | 2006-06-17 00:57:22 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@mit.edu> | 2006-06-17 00:57:22 +0000 |
commit | 46f6e1f7f3c86eb6d6f55f71fda6513ece8275bd (patch) | |
tree | 1b60560bc7bdb3ff120f4a1c093a62f06c8613de /src/appl | |
parent | f6d6e3808600ed1af5de913c79f67c707259ea24 (diff) | |
download | krb5-46f6e1f7f3c86eb6d6f55f71fda6513ece8275bd.zip krb5-46f6e1f7f3c86eb6d6f55f71fda6513ece8275bd.tar.gz krb5-46f6e1f7f3c86eb6d6f55f71fda6513ece8275bd.tar.bz2 |
Test for and use setutsent, based on a patch from Nate Yocom at Centrify.
Modified to restrict the configure test to just the pty library.
ticket: 3423
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18161 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/appl')
-rw-r--r-- | src/appl/libpty/configure.in | 2 | ||||
-rw-r--r-- | src/appl/libpty/update_utmp.c | 25 |
2 files changed, 22 insertions, 5 deletions
diff --git a/src/appl/libpty/configure.in b/src/appl/libpty/configure.in index f8930d0..cb5fe7e 100644 --- a/src/appl/libpty/configure.in +++ b/src/appl/libpty/configure.in @@ -63,7 +63,7 @@ AC_CHECK_HEADER(sys/ptyvar.h, [], [], # AC_CHECK_HEADERS(utmp.h utmpx.h) -AC_CHECK_FUNCS(setutent setutxent updwtmp updwtmpx logwtmp getutmp getutmpx) +AC_CHECK_FUNCS(setutent setutxent setutsent updwtmp updwtmpx logwtmp getutmp getutmpx) AC_CHECK_FUNCS(utmpname utmpxname) AC_DEFUN(K5_CHECK_UT_MEMBER, diff --git a/src/appl/libpty/update_utmp.c b/src/appl/libpty/update_utmp.c index 0045826..d2de642 100644 --- a/src/appl/libpty/update_utmp.c +++ b/src/appl/libpty/update_utmp.c @@ -252,6 +252,14 @@ * * There is no wtmpx file, despite there being utmp and utmpx files. * + * HP-UX 11.23: + * + * In addition to other HP-UX issues, 11.23 includes yet another utmp + * management interface in utmps.h. This interface updates a umtpd + * daemon which then manages local files. Directly accessing the files + * through the existing, yet deprecated, utmp.h interface results in + * nothing. + * * Irix 6.x: * * In utmpx, ut_exit contains __e_termination and __e_exit, which get @@ -324,10 +332,19 @@ /* * The following grossness exists to avoid duplicating lots of code * between the cases where we have an old-style sysV utmp and where we - * have a modern (Unix98 or XPG4) utmpx. See the above history rant - * for further explanation. + * have a modern (Unix98 or XPG4) utmpx, or the new (hp-ux 11.23) utmps. + * See the above history rant for further explanation. */ -#if defined(HAVE_SETUTXENT) || defined(HAVE_SETUTENT) +#if defined(HAVE_SETUTXENT) || defined(HAVE_SETUTENT) || defined(HAVE_SETUTSENT) +#ifdef HAVE_SETUTSENT +#include <utmps.h> +#define PTY_STRUCT_UTMPX struct utmps +#define PTY_SETUTXENT setutsent +#define PTY_GETUTXENT GETUTSENT +#define PTY_GETUTXLINE GETUTSLINE +#define PTY_PUTUTXLINE PUTUTSLINE +#define PTY_ENDUTXENT endutsent +#else #ifdef HAVE_SETUTXENT #define PTY_STRUCT_UTMPX struct utmpx #define PTY_SETUTXENT setutxent @@ -343,7 +360,7 @@ #define PTY_PUTUTXLINE pututline #define PTY_ENDUTXENT endutent #endif - +#endif static int better(const PTY_STRUCT_UTMPX *, const PTY_STRUCT_UTMPX *, const PTY_STRUCT_UTMPX *); static int match_pid(const PTY_STRUCT_UTMPX *, |