summaryrefslogtreecommitdiffstats
path: root/src/lib/krb5util
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2002-06-25 20:56:17 +0000
committerKen Raeburn <raeburn@mit.edu>2002-06-25 20:56:17 +0000
commit99c69a712b10152a895bf9f9897d0306fafca8e6 (patch)
treed394e3859991bba13f78413348a52c04bbfd95a1 /src/lib/krb5util
parent4c22d46592fc34600f718920e10118caba70973c (diff)
downloadkrb5-99c69a712b10152a895bf9f9897d0306fafca8e6.tar.gz
krb5-99c69a712b10152a895bf9f9897d0306fafca8e6.tar.xz
krb5-99c69a712b10152a895bf9f9897d0306fafca8e6.zip
move krb5_sete[ug]id from libkrb5util (fn) to k5-util.h (macro)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14569 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/krb5util')
-rw-r--r--src/lib/krb5util/ChangeLog5
-rw-r--r--src/lib/krb5util/Makefile.in7
-rw-r--r--src/lib/krb5util/seteuid.c80
3 files changed, 8 insertions, 84 deletions
diff --git a/src/lib/krb5util/ChangeLog b/src/lib/krb5util/ChangeLog
index db3dc5eaf..f335bfdd8 100644
--- a/src/lib/krb5util/ChangeLog
+++ b/src/lib/krb5util/ChangeLog
@@ -1,3 +1,8 @@
+2002-06-25 Ken Raeburn <raeburn@mit.edu>
+
+ * seteuid.c: Deleted.
+ * Makefile.in (OBJS, STLIBOBJS, SRCS): Remove references.
+
2001-10-05 Ken Raeburn <raeburn@mit.edu>
* compat_recv.c: Drop _MSDOS support.
diff --git a/src/lib/krb5util/Makefile.in b/src/lib/krb5util/Makefile.in
index dbb47bd37..bc5836ea6 100644
--- a/src/lib/krb5util/Makefile.in
+++ b/src/lib/krb5util/Makefile.in
@@ -6,11 +6,11 @@ BUILDTOP=$(REL)$(U)$(S)$(U)
##DOSBUILDTOP = ..\..
##DOSLIBNAME=krb5util.lib
-OBJS= compat_recv.$(OBJEXT) seteuid.$(OBJEXT)
+OBJS= compat_recv.$(OBJEXT)
-STLIBOBJS=compat_recv.o seteuid.o
+STLIBOBJS=compat_recv.o
-SRCS= $(srcdir)/compat_recv.c $(srcdir)/seteuid.c
+SRCS= $(srcdir)/compat_recv.c
LIB=krb5util
LIBMAJOR=1
@@ -40,5 +40,4 @@ compat_recv.so compat_recv.po $(OUTPRE)compat_recv.$(OBJEXT): compat_recv.c $(SR
$(SRCTOP)/include/socket-utils.h $(SRCTOP)/include/krb5/kdb.h \
$(BUILDTOP)/include/profile.h $(SRCTOP)/include/kerberosIV/krb.h \
$(SRCTOP)/include/kerberosIV/des.h $(SRCTOP)/include/k5-util.h
-seteuid.so seteuid.po $(OUTPRE)seteuid.$(OBJEXT): seteuid.c $(SRCTOP)/include/k5-util.h
diff --git a/src/lib/krb5util/seteuid.c b/src/lib/krb5util/seteuid.c
deleted file mode 100644
index 2b4f596c0..000000000
--- a/src/lib/krb5util/seteuid.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * krb5_seteuid: Attempt to set the effective user ID of the current process
- * in such a way it can be restored lated.
- *
- * Copyright 1996 by the Massachusetts Institute of Technology.
- *
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby
- * granted, provided that the above copyright notice appear in all
- * copies and that both that copyright notice and this permission
- * notice appear in supporting documentation, and that the name of
- * M.I.T. not be used in advertising or publicity pertaining to
- * distribution of the software without specific, written prior
- * permission. Furthermore if you modify this software you must label
- * your software as modified software and not distribute it in such a
- * fashion that it might be confused with the original M.I.T. software.
- * M.I.T. makes no representations about the suitability
- * of this software for any purpose. It is provided "as is" without
- * express or implied warranty.
- *
- */
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-#include <k5-util.h>
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-
-#include <errno.h>
-
-int krb5_seteuid(euid_in)
- int euid_in;
-{
- uid_t euid = (uid_t) euid_in;
-#if defined(HAVE_SETEUID)
- return (seteuid(euid));
-#else
-#if defined(HAVE_SETRESUID)
- return (setresuid(getuid(), euid, geteuid()));
-#else
-#if defined(HAVE_SETREUID)
- return setreuid(geteuid(), euid);
-#else /*HAVE_SETREUID*/
- /* You need to add a case to deal with this operating system.*/
- errno = EPERM;
- return -1;
-#endif /* HAVE_SETREUID */
-#endif /* HAVE_SETRESUID */
-#endif /* HAVE_SETEUID */
-}
-
-int krb5_setegid(egid_in)
- int egid_in;
-{
- gid_t egid = (gid_t) egid_in;
-
-#ifdef HAVE_SETEGID
- return (setegid(egid));
-#else
-#ifdef HAVE_SETRESGID
- return (setresgid(getgid(), egid, getegid()));
-#else
-#ifdef HAVE_SETREGID
- return (setregid(getegid(), egid));
-#else /* HAVE_SETREGID */
- /* You need to add a case to deal with this operating system.*/
- errno = EPERM;
- return -1;
-#endif /* HAVE_SETREGID */
-#endif /* HAVE_SETRESGID */
-#endif /* HAVE_SETEGID */
-}