]> granicus.if.org Git - sudo/commitdiff
aix changes
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 3 Feb 1994 05:44:46 +0000 (05:44 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 3 Feb 1994 05:44:46 +0000 (05:44 +0000)
sudo.c

diff --git a/sudo.c b/sudo.c
index 7b30b5bc93afe08eac0c3c6dce05960e16b8cf7d..48e95141ae982361b7923c49d3fd175e46d31921 100644 (file)
--- a/sudo.c
+++ b/sudo.c
@@ -68,6 +68,9 @@ static char rcsid[] = "$Id$";
 #include <pwd.h>
 #include <netdb.h>
 #include <sys/param.h>
+#ifdef _AIX
+#include <sys/id.h>
+#endif /* _AIX */
 #include "sudo.h"
 #ifndef STD_HEADERS
 extern char *malloc();
@@ -328,6 +331,15 @@ void be_root()
  *  this function sets the effective uid to the value of uid
  */
 
+#ifdef _AIX
+void be_user()
+{
+    if (setuidx(ID_EFFECTIVE|ID_REAL, uid)) {
+        perror("setuidx(ID_EFFECTIVE|ID_REAL, uid)");
+        exit(1); 
+    }
+}
+#else /* _AIX */
 void be_user()
 {
     if (seteuid(uid)) {
@@ -335,6 +347,7 @@ void be_user()
         exit(1); 
     }
 }
+#endif /* _AIX */