From f08795c26e702c41b64e7148f5d2d314c1894317 Mon Sep 17 00:00:00 2001 From: Sam Hartman Date: Mon, 20 May 1996 06:54:42 +0000 Subject: [PATCH] Fixes so krb5_seteuid compiles on Ultrix git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8058 dc483132-0cff-0310-8789-dd5450dbe970 --- src/include/ChangeLog | 5 +++++ src/include/k5-int.h | 4 ++-- src/lib/krb5util/ChangeLog | 4 ++++ src/lib/krb5util/configure.in | 2 +- src/lib/krb5util/seteuid.c | 10 ++++++++-- 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/include/ChangeLog b/src/include/ChangeLog index 599317d8f..0bc2b335a 100644 --- a/src/include/ChangeLog +++ b/src/include/ChangeLog @@ -1,3 +1,8 @@ +Mon May 20 02:51:06 1996 Sam Hartman + + * k5-int.h: Ultrix CC wants krb5_seteuid to take uid_t so that the + type can be promoted from a short. + Sat May 18 16:53:06 1996 Sam Hartman * k5-int.h: Add krb5_seteuid diff --git a/src/include/k5-int.h b/src/include/k5-int.h index 55f1cae12..825a49b6e 100644 --- a/src/include/k5-int.h +++ b/src/include/k5-int.h @@ -1431,7 +1431,7 @@ krb5_error_code krb5_ser_unpack_bytes KRB5_PROTOTYPE((krb5_octet *, */ #define KRB5_VERIFY_MAGIC(structure,magic_number) \ if ((structure)->magic != (magic_number)) return (magic_number); - -int krb5_seteuid KRB5_PROTOTYPE((uid_t)); + +int krb5_seteuid KRB5_PROTOTYPE((int)); #endif /* _KRB5_INT_H */ diff --git a/src/lib/krb5util/ChangeLog b/src/lib/krb5util/ChangeLog index 92dca5ba9..ce17d9639 100644 --- a/src/lib/krb5util/ChangeLog +++ b/src/lib/krb5util/ChangeLog @@ -1,3 +1,7 @@ +Mon May 20 02:37:44 1996 Sam Hartman + + * seteuid.c: Include k5-int.h + Sun May 19 23:28:22 1996 Sam Hartman * seteuid.c (krb5_seteuid): set saved uid to current effective diff --git a/src/lib/krb5util/configure.in b/src/lib/krb5util/configure.in index 7bcfa4872..638bf2735 100644 --- a/src/lib/krb5util/configure.in +++ b/src/lib/krb5util/configure.in @@ -4,7 +4,7 @@ AC_PROG_ARCHIVE AC_PROG_ARCHIVE_ADD AC_PROG_RANLIB AC_PROG_INSTALL -AC_CHECK_HEADERS(unistd.h stdlib.h) +AC_CHECK_HEADERS(unistd.h stdlib.h sys/types.h) AC_CHECK_FUNCS(seteuid setresuid setreuid) LinkFileDir(../libkrb5util.a, libkrb5util.a, ./krb5util) AppendRule([all-unix:: ../libkrb5util.a]) diff --git a/src/lib/krb5util/seteuid.c b/src/lib/krb5util/seteuid.c index a84db79ad..017e0b9ad 100644 --- a/src/lib/krb5util/seteuid.c +++ b/src/lib/krb5util/seteuid.c @@ -17,7 +17,11 @@ * express or implied warranty. * */ +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#include #ifdef HAVE_UNISTD_H #include @@ -27,11 +31,13 @@ #include #endif + #include -int krb5_seteuid( euid) - uid_t euid; +int krb5_seteuid( euid_in) + int euid_in; { + uid_t euid = (uid_t) euid_in; #if defined(_POSIX_SAVED_IDS) && defined(HAVE_SETEUID) return (seteuid(euid)) ; #else -- 2.26.2