Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Contributions to ELOG  Not logged in ELOG logo
Entry   Compiling elogd.c on HP-UX 64 bit, posted by Peter Rienstra on Wed Jul 11 11:13:16 2007 elogdhpux64.c.gz
    Reply   Re: Compiling elogd.c on HP-UX 64 bit, posted by Stefan Ritt on Fri Jul 13 12:36:45 2007 
       Reply   Re: Compiling elogd.c on HP-UX 64 bit, posted by Peter Rienstra on Mon Jul 16 15:27:08 2007 man_setuid.txtman_setreuid.txtman_setresuid.txt
          Reply   Re: Compiling elogd.c on HP-UX 64 bit, posted by Stefan Ritt on Mon Jul 16 15:57:47 2007 
             Reply   Re: Compiling elogd.c on HP-UX 64 bit, posted by Peter Rienstra on Mon Jul 16 16:43:07 2007 
Message ID: 23     Entry time: Fri Jul 13 12:36:45 2007     In reply to: 22     Reply to this: 24
Author: Stefan Ritt 
Author Email: stefan.ritt@psi.ch 
Category: Other 
Subject: Re: Compiling elogd.c on HP-UX 64 bit 
Status: Beta 
Last Revision: Thu Jul 12 09:38:47 2007 by Peter Rienstra 
I applied most of your patches to the elog source code, SVN revision 1885. The only missing piece has to do with seteuid/setuid. I definitively need seteuid for linux, because elogd might be started under root, then it falls back to an optional elog user. But when it stops, it has to restore the original root user in order to delete the PID file (/var/run/elogd.pid) which was created under root. If seteuid does not exist under HP-UX, you should add something like
#ifdef HP-UX
  setuid(...)
#else
  seteuid(...)
#endif

Probably the HP-UX has to be something else, but I cannot test this since I don't have such an OS here. Once you get this working I can put it into the standard distribution.
ELOG V3.1.5-fe60aaf