Here's a patch that will let wrapper run suid/sgid majordom/daemon instead
of suid root on HP-UX machines. (With this change, you can use the BSD
options in the makefile instead of the SYSV stuff...)
The change applies at least as far back as 8.0, and probably 7.0.
lamont
=================================================================
*** wrapper.c.orig Sat Jan 7 10:28:00 1995
--- wrapper.c Fri Apr 21 15:50:29 1995
***************
*** 109,125 ****
--- 109,135 ----
#endif
+ #ifdef __hpux
+ i=getegid();
+ setresgid(i,i,i);
+ #else /* __hpux */
#ifdef POSIX_GID
setgid(POSIX_GID);
#else
setgid(getegid());
#endif
+ #endif /* __hpux */
+ #ifdef __hpux
+ i=geteuid();
+ setresuid(i,i,i);
+ #else /* __hpux */
#ifdef POSIX_UID
setuid(POSIX_UID);
#else
setuid(geteuid());
#endif
+ #endif /* __hpux */
if ((getuid() != geteuid()) || (getgid() != getegid())) {
fprintf(stderr, "%s: error: recompile with POSIX flags.\n", argv[0]);
|
|