From: Ken Raeburn Date: Tue, 25 Feb 2003 20:53:45 +0000 (+0000) Subject: * in_tkt.c: Include k5-util.h. X-Git-Tag: krb5-1.3-alpha1~74 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ca3b1ca532029b4d201d17f683ad77beed4f880a;p=krb5.git * in_tkt.c: Include k5-util.h. (do_seteuid): Define as krb5_seteuid instead of testing system characteristics here. * dest_tkt.c: Likewise. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15203 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb4/ChangeLog b/src/lib/krb4/ChangeLog index 6c7b25d20..56516c8b2 100644 --- a/src/lib/krb4/ChangeLog +++ b/src/lib/krb4/ChangeLog @@ -1,5 +1,10 @@ 2003-02-25 Ken Raeburn + * in_tkt.c: Include k5-util.h. + (do_seteuid): Define as krb5_seteuid instead of testing system + characteristics here. + * dest_tkt.c: Likewise. + * change_password.c (krb_change_password): Use int, not KRB_INT32, for krb4 error codes. Check for malloc failure allocating sendStream. diff --git a/src/lib/krb4/dest_tkt.c b/src/lib/krb4/dest_tkt.c index 676302509..4f7c1e377 100644 --- a/src/lib/krb4/dest_tkt.c +++ b/src/lib/krb4/dest_tkt.c @@ -29,6 +29,10 @@ #include #include #include + +#include "k5-util.h" +#define do_seteuid krb5_seteuid + #ifdef TKT_SHMEM #include #endif @@ -41,20 +45,6 @@ #define O_SYNC 0 #endif -#ifdef HAVE_SETEUID -#define do_seteuid(e) seteuid((e)) -#else -#ifdef HAVE_SETRESUID -#define do_seteuid(e) setresuid(-1, (e), -1) -#else -#ifdef HAVE_SETREUID -#define do_seteuid(e) setreuid(geteuid(), (e)) -#else -#define do_seteuid(e) (errno = EPERM, -1) -#endif -#endif -#endif - /* * dest_tkt() is used to destroy the ticket store upon logout. * If the ticket file does not exist, dest_tkt() returns RET_TKFIL. diff --git a/src/lib/krb4/in_tkt.c b/src/lib/krb4/in_tkt.c index b76cd7052..4a7624878 100644 --- a/src/lib/krb4/in_tkt.c +++ b/src/lib/krb4/in_tkt.c @@ -46,19 +46,8 @@ extern int krb_debug; * success, or KFAILURE if something goes wrong. */ -#ifdef HAVE_SETEUID -#define do_seteuid(e) seteuid((e)) -#else -#ifdef HAVE_SETRESUID -#define do_seteuid(e) setresuid(-1, (e), -1) -#else -#ifdef HAVE_SETREUID -#define do_seteuid(e) setreuid(geteuid(), (e)) -#else -#define do_seteuid(e) (errno = EPERM, -1) -#endif -#endif -#endif +#include "k5-util.h" +#define do_seteuid krb5_seteuid #ifndef O_SYNC #define O_SYNC 0