diff options
author | Ken Raeburn <raeburn@mit.edu> | 2003-02-25 20:53:45 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@mit.edu> | 2003-02-25 20:53:45 +0000 |
commit | ca3b1ca532029b4d201d17f683ad77beed4f880a (patch) | |
tree | 9eeaea78cc3e6007dfadb9635cbf6c92782884ae | |
parent | 1bce2d928206724865acc77e4576cf7977a4ac10 (diff) | |
download | krb5-ca3b1ca532029b4d201d17f683ad77beed4f880a.zip krb5-ca3b1ca532029b4d201d17f683ad77beed4f880a.tar.gz krb5-ca3b1ca532029b4d201d17f683ad77beed4f880a.tar.bz2 |
* 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
-rw-r--r-- | src/lib/krb4/ChangeLog | 5 | ||||
-rw-r--r-- | src/lib/krb4/dest_tkt.c | 18 | ||||
-rw-r--r-- | src/lib/krb4/in_tkt.c | 15 |
3 files changed, 11 insertions, 27 deletions
diff --git a/src/lib/krb4/ChangeLog b/src/lib/krb4/ChangeLog index 6c7b25d..56516c8 100644 --- a/src/lib/krb4/ChangeLog +++ b/src/lib/krb4/ChangeLog @@ -1,5 +1,10 @@ 2003-02-25 Ken Raeburn <raeburn@mit.edu> + * 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 6763025..4f7c1e3 100644 --- a/src/lib/krb4/dest_tkt.c +++ b/src/lib/krb4/dest_tkt.c @@ -29,6 +29,10 @@ #include <string.h> #include <fcntl.h> #include <sys/stat.h> + +#include "k5-util.h" +#define do_seteuid krb5_seteuid + #ifdef TKT_SHMEM #include <sys/param.h> #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 b76cd70..4a76248 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 |