summaryrefslogtreecommitdiff
path: root/shells/pdksh
diff options
context:
space:
mode:
authorahoka <ahoka@pkgsrc.org>2009-06-27 23:42:39 +0000
committerahoka <ahoka@pkgsrc.org>2009-06-27 23:42:39 +0000
commit72970e7ba060d4f8577908169b5b2ee1791426c8 (patch)
tree5433a876f3a13fdc993226079280166603f9b868 /shells/pdksh
parentf1ced776aac303367cc2e3894decf9fde388adb6 (diff)
downloadpkgsrc-72970e7ba060d4f8577908169b5b2ee1791426c8.tar.gz
Fix build on HP-UX.
pdksh is so messy.
Diffstat (limited to 'shells/pdksh')
-rw-r--r--shells/pdksh/files/misc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/shells/pdksh/files/misc.c b/shells/pdksh/files/misc.c
index 2ce06e8c90b..8acd5a112dc 100644
--- a/shells/pdksh/files/misc.c
+++ b/shells/pdksh/files/misc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: misc.c,v 1.3 2008/06/15 14:20:09 tnn Exp $ */
+/* $NetBSD: misc.c,v 1.4 2009/06/27 23:42:39 ahoka Exp $ */
/*
* Miscellaneous functions
@@ -319,6 +319,12 @@ change_flag(f, what, newval)
if (f == FPRIVILEGED && oldval && !newval) {
#ifdef OS2
;
+#elif defined(__hpux)
+ ksheuid = getuid();
+ setresuid((uid_t) -1, getuid(), (uid_t) -1);
+ setuid(ksheuid);
+ setresgid((gid_t) -1, getgid(), (gid_t) -1);
+ setgid(getgid());
#else /* OS2 */
seteuid(ksheuid = getuid());
setuid(ksheuid);