From b7113ec9f7fbfc16964f5485e01988116150673c Mon Sep 17 00:00:00 2001 From: Mark Eichin Date: Sat, 27 Jan 1996 06:06:22 +0000 Subject: [PATCH] * kuserok.c: use HAVE_SETEUID and HAVE_SETRESUID to figure out how to emulate seteuid instead of assuming hpux. * configure.in: test for seteuid as well; fold some tests into a single AC_HAVE_FUNCS. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7401 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb4/ChangeLog | 7 +++++++ src/lib/krb4/configure.in | 4 +--- src/lib/krb4/kuserok.c | 4 +++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/lib/krb4/ChangeLog b/src/lib/krb4/ChangeLog index 8e5eaf552..e3d820989 100644 --- a/src/lib/krb4/ChangeLog +++ b/src/lib/krb4/ChangeLog @@ -1,3 +1,10 @@ +Sat Jan 27 01:05:12 1996 Mark Eichin + + * kuserok.c: use HAVE_SETEUID and HAVE_SETRESUID to figure out how + to emulate seteuid instead of assuming hpux. + * configure.in: test for seteuid as well; fold some tests into a + single AC_HAVE_FUNCS. + Tue Dec 5 20:53:40 1995 Ezra Peisach * Makefile.in: Shared library depends on krb5 library now. diff --git a/src/lib/krb4/configure.in b/src/lib/krb4/configure.in index 5a2eb94a0..9642b5f98 100644 --- a/src/lib/krb4/configure.in +++ b/src/lib/krb4/configure.in @@ -38,9 +38,7 @@ if test $ac_cv_sizeof_int = 2; then else AC_DEFINE(BITS32) fi -AC_FUNC_CHECK(strsave,AC_DEFINE(HAVE_STRSAVE)) -AC_FUNC_CHECK(setreuid,AC_DEFINE(HAVE_SETREUID)) -AC_FUNC_CHECK(setresuid,AC_DEFINE(HAVE_SETRESUID)) +AC_HAVE_FUNCS(strsave seteuid setreuid setresuid) ET_RULES V5_SHARED_LIB_OBJS SubdirLibraryRule([$(OBJS)]) diff --git a/src/lib/krb4/kuserok.c b/src/lib/krb4/kuserok.c index f83550775..6f45afeb3 100644 --- a/src/lib/krb4/kuserok.c +++ b/src/lib/krb4/kuserok.c @@ -27,10 +27,12 @@ #include #endif -#ifdef hpux +#ifndef HAVE_SETEUID +#ifdef HAVE_SETRESUID #define seteuid(e) setresuid(-1,e,-1) #define setegid(e) setresgid(-1,e,-1) #endif +#endif #define OK 0 #define NOTOK 1 -- 2.26.2