<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Tested OK on HP-UX B.11.11.<br>
<br>
Rob Crittenden wrote:
<blockquote cite="mid44D8E755.4060009@redhat.com" type="cite"><a class="moz-txt-link-freetext" href="https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=200988">https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=200988</a>
  <br>
Bug(s) fixed: 200988
  <br>
Bug Description: mod_admserv: use setresuid() in lieu of seteuid() on
HP/ux
  <br>
Reviewed by: ???
  <br>
Files: See diff
  <br>
Branch: HEAD
  <br>
Fix Description: Per Ulf's suggestion, use SETEUID macro. apxs will
define -DHPUX11 on an HP/ux machine causing this code to be executed. I
also included a generic HPUX and HPUX10 for completeness. I've only
tested that it won't break FC, not that it works on HP/ux (but it seems
obvious that it will). Maybe we can get Ulf's help in testing...
  <br>
Platforms tested: FC4
  <br>
Flag Day: no
  <br>
Doc impact: no
  <br>
QA impact: no
  <br>
  <pre wrap="">
<hr size="4" width="90%">
Index: mod_admserv.c
===================================================================
RCS file: /cvs/dirsec/mod_admserv/mod_admserv.c,v
retrieving revision 1.26
diff -u -r1.26 mod_admserv.c
--- mod_admserv.c        17 Jul 2006 19:01:29 -0000        1.26
+++ mod_admserv.c        8 Aug 2006 19:27:55 -0000
@@ -65,6 +65,12 @@
 
 #include "mod_admserv.h"
 
+#if defined(HPUX) || defined(HPUX10) || defined(HPUX11)
+#define SETEUID(id) setresuid((uid_t) -1, id, (uid_t) -1)
+#else
+#define SETEUID(id) seteuid(id)
+#endif
+
 /*
  * These are keys for items we store in r-&gt;notes to pass data from one stage
  * in the request to another.  They must be unique.  If necessary, prefix
@@ -2031,7 +2037,7 @@
 #ifdef CHANGE_EUID
     /* make sure pset creates the cache file owned by the server uid, not root */
     if (geteuid() == 0) {
-        seteuid(unixd_config.user_id);
+        SETEUID(unixd_config.user_id);
         reseteuid = 1;
     }
 #endif /* CHANGE_EUID */
@@ -2044,7 +2050,7 @@
 
 #ifdef CHANGE_EUID
     if (reseteuid) {
-        seteuid(0);
+        SETEUID(0);
     }
 #endif /* CHANGE_EUID */
 
  </pre>
  <pre wrap="">
<hr size="4" width="90%">
--
Fedora-directory-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Fedora-directory-devel@redhat.com">Fedora-directory-devel@redhat.com</a>
<a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/fedora-directory-devel">https://www.redhat.com/mailman/listinfo/fedora-directory-devel</a>
  </pre>
</blockquote>
</body>
</html>