summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Yu <tlyu@mit.edu>1998-01-06 22:28:25 +0000
committerTom Yu <tlyu@mit.edu>1998-01-06 22:28:25 +0000
commit4261a5d8b46a19ff7ed7c1edbe0feb259634f086 (patch)
treeace364194961c914e7591d005debd8822c2043a7
parentb12b3df4aaa4725b942bfb553bdf160d61e5f139 (diff)
downloadkrb5-4261a5d8b46a19ff7ed7c1edbe0feb259634f086.tar.gz
krb5-4261a5d8b46a19ff7ed7c1edbe0feb259634f086.tar.xz
krb5-4261a5d8b46a19ff7ed7c1edbe0feb259634f086.zip
* seteuid.c (krb5_seteuid): Don't check for _POSIX_SAVED_IDS, as
4.4BSD derivatives don't define it but do have a reasonable seteuid anyway. [krb5-libs/503] git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10348 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r--src/lib/krb5util/ChangeLog6
-rw-r--r--src/lib/krb5util/seteuid.c15
2 files changed, 12 insertions, 9 deletions
diff --git a/src/lib/krb5util/ChangeLog b/src/lib/krb5util/ChangeLog
index 57fdd7455a..1666316bf5 100644
--- a/src/lib/krb5util/ChangeLog
+++ b/src/lib/krb5util/ChangeLog
@@ -1,3 +1,9 @@
+Tue Jan 6 16:51:44 1998 Tom Yu <tlyu@mit.edu>
+
+ * seteuid.c (krb5_seteuid): Don't check for _POSIX_SAVED_IDS, as
+ 4.4BSD derivatives don't define it but do have a reasonable
+ seteuid anyway. [krb5-libs/503]
+
Tue Nov 18 19:55:22 1997 Tom Yu <tlyu@mit.edu>
* configure.in: Use new library build rules.
diff --git a/src/lib/krb5util/seteuid.c b/src/lib/krb5util/seteuid.c
index 017e0b9ad2..25b3a87137 100644
--- a/src/lib/krb5util/seteuid.c
+++ b/src/lib/krb5util/seteuid.c
@@ -31,15 +31,14 @@
#include <stdlib.h>
#endif
-
#include <errno.h>
int krb5_seteuid( euid_in)
- int euid_in;
+ int euid_in;
{
- uid_t euid = (uid_t) euid_in;
-#if defined(_POSIX_SAVED_IDS) && defined(HAVE_SETEUID)
- return (seteuid(euid)) ;
+ uid_t euid = (uid_t) euid_in;
+#if defined(HAVE_SETEUID)
+ return (seteuid(euid)) ;
#else
#if defined(HAVE_SETRESUID)
return (setresuid(getuid(), euid, geteuid())) ;
@@ -49,11 +48,9 @@ int krb5_seteuid( euid_in)
#else /*HAVE_SETREUID*/
/* You need to add a case to deal with this operating system.*/
errno = EPERM;
- return -1;
+ return -1;
#endif /* HAVE_SETREUID */
#endif /* HAVE_SETRESUID */
-#endif /* _POSIX_SAVED_IDS */
-
-
+#endif /* HAVE_SETEUID */
}