Great Circle Associates Majordomo-Workers
(April 1995)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: majordomo 1.93 patch for hp-ux
From: LaMont Jones <lamont @ hp . com>
Date: Fri, 21 Apr 1995 15:00:38 -0700
To: majordomo-workers @ greatcircle . com
Cc: brent @ greatcircle . com, LaMont Jones <lamont @ hp . com>

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]);

Indexed By Date Previous: Re: large volumes?
From: dwolfe@risc.sps.mot.com (Dave Wolfe)
Next: Re: large volumes? (again)
From: dwolfe@risc.sps.mot.com (Dave Wolfe)
Indexed By Thread Previous: Re: large volumes?
From: dwolfe@risc.sps.mot.com (Dave Wolfe)
Next: Re: large volumes? (again)
From: dwolfe@risc.sps.mot.com (Dave Wolfe)

Google
 
Search Internet Search www.greatcircle.com