hpux does setreuid differently (Hermann Lauer)
authorjbj <devnull@localhost>
Thu, 24 Sep 1998 16:57:38 +0000 (16:57 +0000)
committerjbj <devnull@localhost>
Thu, 24 Sep 1998 16:57:38 +0000 (16:57 +0000)
CVS patchset: 2342
CVS date: 1998/09/24 16:57:38

popt/findme.c
popt/popt.c

index 4e43d86..528d401 100644 (file)
@@ -2,6 +2,11 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#ifdef __NeXT
+/* access macros are not declared in non posix mode in unistd.h -
+ don't try to use posix on NeXTstep 3.3 ! */ 
+#include <libc.h>
+#endif
 
 #if HAVE_ALLOCA_H
 # include <alloca.h>
index 886ac72..fbe5a95 100644 (file)
@@ -222,7 +222,11 @@ static void execCommand(poptContext con) {
 
     argv[pos++] = NULL;
 
-    setreuid(getuid(), getuid());
+#ifdef __hpux
+    setresuid(getuid(), getuid(),-1);
+#else
+    setreuid(getuid(), getuid()); /*hlauer: not portable to hpux9.01 */
+#endif
 
     execvp(argv[0], argv);
 }