From: Ezra Peisach Date: Mon, 11 Jun 2001 22:32:19 +0000 (+0000) Subject: * pty-int.h: Provide revoke() prototype if system headers lacking X-Git-Tag: krb5-1.3-alpha1~1426 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3f3a704da40dcc424efcd8cf3a1ada9902a77989;p=krb5.git * pty-int.h: Provide revoke() prototype if system headers lacking * logwtmp.c: Provide logwtmp() prototype if needed. * configure.in: Check for system provided getutmp(), logwtmp() and revoke() prototypes. Check for util.h, libutil.h. * update_wtmp.c: Provide prototype for getutmp() if needed. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13336 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/util/pty/ChangeLog b/src/util/pty/ChangeLog index 8c9f2b2d2..9f897734e 100644 --- a/src/util/pty/ChangeLog +++ b/src/util/pty/ChangeLog @@ -1,8 +1,13 @@ 2001-06-11 Ezra Peisach - * configure.in: Check for system provided getutmp() prototype. + * pty-int.h: Provide revoke() prototype if system headers lacking. - * update_wtmp.c: Provide prototype for getutmp() if needed. + * logwtmp.c: Provide logwtmp() prototype if needed. + + * configure.in: Check for system provided getutmp(), logwtmp() and + revoke() prototypes. Check for util.h, libutil.h. + + * update_wtmp.c: Provide prototype for getutmp() if needed. 2001-05-15 Tom Yu diff --git a/src/util/pty/configure.in b/src/util/pty/configure.in index b41790b8e..385727700 100644 --- a/src/util/pty/configure.in +++ b/src/util/pty/configure.in @@ -55,8 +55,7 @@ AC_TYPE_MODE_T AC_CHECK_TYPE(time_t, long) AC_CHECK_FUNC(strsave,[AC_DEFINE(HAS_STRSAVE)]) AC_CHECK_FUNCS(setreuid gettosbyname setsid ttyname line_push ptsname grantpt openpty) -AC_CHECK_HEADERS(unistd.h stdlib.h string.h pty.h sys/filio.h sys/sockio.h sys/label.h sys/tty.h ttyent.h lastlog.h sys/select.h sys/ptyvar.h) -AC_CHECK_HEADERS(sys/wait.h) +AC_CHECK_HEADERS(unistd.h stdlib.h string.h libutil.h pty.h sys/filio.h sys/sockio.h sys/label.h sys/tty.h sys/wait.h ttyent.h lastlog.h sys/select.h sys/ptyvar.h util.h) AC_CHECK_FUNCS(waitpid) DECLARE_SYS_ERRLIST KRB5_SIGTYPE @@ -202,6 +201,22 @@ KRB5_NEED_PROTO([#ifdef HAVE_UTMP_H #endif ],getutmp) dnl +######################################### +KRB5_NEED_PROTO([#include +#ifdef HAVE_UTMP_H +#include +#endif +#ifdef HAVE_LIBUTIL_H +#include +#endif +#ifdef HAVE_UTIL_H +#include +#endif +],logwtmp) +######################################## +KRB5_NEED_PROTO([#include +],revoke) +######################################## dnl AC_MSG_CHECKING([streams interface]) AC_CACHE_VAL(krb5_cv_has_streams, diff --git a/src/util/pty/logwtmp.c b/src/util/pty/logwtmp.c index 204727889..6cb696157 100644 --- a/src/util/pty/logwtmp.c +++ b/src/util/pty/logwtmp.c @@ -30,6 +30,10 @@ #define PTY_STRUCT_UTMPX struct utmp #endif +#ifdef NEED_LOGWTMP_PROTO +void logwtmp(const char *, const char *, const char *); +#endif + long pty_logwtmp(const char *tty, const char *user, const char *host) { diff --git a/src/util/pty/pty-int.h b/src/util/pty/pty-int.h index b3c6146a6..62798bc4b 100644 --- a/src/util/pty/pty-int.h +++ b/src/util/pty/pty-int.h @@ -99,6 +99,10 @@ extern void getutmpx (const struct utmp *, struct utmpx *); #endif +#if defined(NEED_REVOKE_PROTO) +extern int revoke(const char *); +#endif + /* Internal functions */ long ptyint_void_association(void); long ptyint_open_ctty (char *slave, int *fd);