From f8f96a4609fac0d82e564153e56dc599f11fdbb9 Mon Sep 17 00:00:00 2001 From: jbj Date: Thu, 24 Sep 1998 16:57:38 +0000 Subject: [PATCH] hpux does setreuid differently (Hermann Lauer) CVS patchset: 2342 CVS date: 1998/09/24 16:57:38 --- popt/findme.c | 5 +++++ popt/popt.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/popt/findme.c b/popt/findme.c index 4e43d86..528d401 100644 --- a/popt/findme.c +++ b/popt/findme.c @@ -2,6 +2,11 @@ #include #include #include +#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 +#endif #if HAVE_ALLOCA_H # include diff --git a/popt/popt.c b/popt/popt.c index 886ac72..fbe5a95 100644 --- a/popt/popt.c +++ b/popt/popt.c @@ -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); } -- 2.7.4