/*
- * $Id: tools.cc,v 1.211 2001/11/13 22:17:01 hno Exp $
+ * $Id: tools.cc,v 1.212 2001/11/15 15:01:37 hno Exp $
*
* DEBUG: section 21 Misc Functions
* AUTHOR: Harvest Derived
void
leave_suid(void)
{
- debug(21, 3) ("leave_suid: PID %d called\n", getpid());
+ debug(21, 3) ("leave_suid: PID %d called\n", (int)getpid());
if (geteuid() != 0)
return;
/* Started as a root, check suid option */
if (setgid(Config2.effectiveGroupID) < 0)
debug(50, 0) ("ALERT: setgid: %s\n", xstrerror());
debug(21, 3) ("leave_suid: PID %d giving up root, becoming '%s'\n",
- getpid(), Config.effectiveUser);
+ (int)getpid(), Config.effectiveUser);
#if HAVE_SETRESUID
if (setresuid(Config2.effectiveUserID, Config2.effectiveUserID, 0) < 0)
debug(50, 0) ("ALERT: setresuid: %s\n", xstrerror());
void
enter_suid(void)
{
- debug(21, 3) ("enter_suid: PID %d taking root priveleges\n", getpid());
+ debug(21, 3) ("enter_suid: PID %d taking root priveleges\n", (int)getpid());
#if HAVE_SETRESUID
setresuid(-1, 0, -1);
#else
uid_t uid;
leave_suid();
uid = geteuid();
- debug(21, 3) ("leave_suid: PID %d giving up root priveleges forever\n", getpid());
+ debug(21, 3) ("leave_suid: PID %d giving up root priveleges forever\n", (int)getpid());
#if HAVE_SETRESUID
if (setresuid(uid, uid, uid) < 0)
debug(50, 1) ("no_suid: setresuid: %s\n", xstrerror());