static char *__foo;
extern char debug_enabled;
#define debug(X...) if (debug_enabled) { \
- fprintf(stderr,"ntlm-auth[%d](%s:%d): ", getpid(), \
+ fprintf(stderr,"ntlm-auth[%ld](%s:%d): ", (long)getpid(), \
((__foo=strrchr(__FILE__,'/'))==NULL?__FILE__:__foo+1),\
__LINE__);\
fprintf(stderr,X); }
alarm(0);
signal(SIGALRM, SIG_DFL);
if (got_timeout != 0) {
- fprintf(stderr, "ntlm-auth[%d]: Timeout during authentication.\n", getpid());
+ fprintf(stderr, "ntlm-auth[%ld]: Timeout during authentication.\n", (long)getpid());
SEND("BH Timeout during authentication");
got_timeout = 0;
return;
/*
- * $Id: main.cc,v 1.403 2005/01/08 10:09:31 serassio Exp $
+ * $Id: main.cc,v 1.404 2005/03/13 09:23:33 serassio Exp $
*
* DEBUG: section 1 Startup and Main Loop
* AUTHOR: Harvest Derived
#ifdef KILL_PARENT_OPT
if (getppid() > 1) {
- debug(1, 1) ("Killing RunCache, pid %d\n", getppid());
+ debugs(1, 1, "Killing RunCache, pid " << getppid());
if (kill(getppid(), sig) < 0)
- debug(1, 1) ("kill %d: %s\n", getppid(), xstrerror());
+ debugs(1, 1, "kill " << getppid() << ": " << xstrerror());
}
#endif
#endif
- debug(1, 1) ("Process ID %d\n", (int) getpid());
+ debugs(1, 1, "Process ID " << getpid());
debug(1, 1) ("With %d file descriptors available\n", Squid_MaxFD);
/*
- * $Id: tools.cc,v 1.251 2005/02/06 09:37:15 serassio Exp $
+ * $Id: tools.cc,v 1.252 2005/03/13 09:23:33 serassio Exp $
*
* DEBUG: section 21 Misc Functions
* AUTHOR: Harvest Derived
void
leave_suid(void)
{
- debug(21, 3) ("leave_suid: PID %d called\n", (int) getpid());
+ debugs(21, 3, "leave_suid: PID " << getpid() << " called");
if (Config.effectiveGroup) {
if (Config.effectiveUser == NULL)
return;
- debug(21, 3) ("leave_suid: PID %d giving up root, becoming '%s'\n",
- (int) getpid(), Config.effectiveUser);
+ debugs(21, 3, "leave_suid: PID " << getpid() << " giving up root, becoming '" << Config.effectiveUser << "'");
if (!Config.effectiveGroup) {
void
enter_suid(void)
{
- debug(21, 3) ("enter_suid: PID %d taking root priveleges\n", (int) getpid());
+ debugs(21, 3, "enter_suid: PID " << getpid() << " taking root priveleges");
#if HAVE_SETRESUID
setresuid((uid_t)-1, 0, (uid_t)-1);
uid_t uid;
leave_suid();
uid = geteuid();
- debug(21, 3) ("leave_suid: PID %d giving up root priveleges forever\n", (int) getpid());
+ debugs(21, 3, "leave_suid: PID " << getpid() << " giving up root priveleges forever");
#if HAVE_SETRESUID
if (setresuid(uid, uid, uid) < 0)