X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;f=jcc.c;h=c367919f4cee9ef500863ca618259b3ec4161581;hb=57aa29909cfed52179822fbbfd1bfab86bc0e12d;hp=18ed76d8193f22263030e788ebf9165b5eca9193;hpb=b0a9896c309e1ff55934533d3794ff01fff29533;p=privoxy.git diff --git a/jcc.c b/jcc.c index 18ed76d8..c367919f 100644 --- a/jcc.c +++ b/jcc.c @@ -1,4 +1,4 @@ -const char jcc_rcs[] = "$Id: jcc.c,v 1.73 2002/03/05 23:57:30 hal9 Exp $"; +const char jcc_rcs[] = "$Id: jcc.c,v 1.75 2002/03/06 10:02:19 oes Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jcc.c,v $ @@ -33,6 +33,14 @@ const char jcc_rcs[] = "$Id: jcc.c,v 1.73 2002/03/05 23:57:30 hal9 Exp $"; * * Revisions : * $Log: jcc.c,v $ + * Revision 1.75 2002/03/06 10:02:19 oes + * Fixed stupid bug when --user was not given + * + * Revision 1.74 2002/03/06 00:49:31 jongfoster + * Fixing warning on Windows + * Making #ifdefs that refer to the same variable consistently + * use #ifdef unix rather than mixing #ifdef unix & #ifndef OS2 + * * Revision 1.73 2002/03/05 23:57:30 hal9 * Stray character 's' on line 1618 was breaking build. * @@ -580,7 +588,7 @@ static const char VANILLA_WAFER[] = * to be reopened by the main thread on HUP. * * Parameters : - * 1 : the_signal - the signal cause this function to call + * 1 : the_signal = the signal cause this function to call * * Returns : - * @@ -1572,7 +1580,7 @@ int main(int argc, const char *argv[]) { int argc_pos = 0; #ifdef unix - struct passwd *pw; + struct passwd *pw = NULL; #endif Argc = argc; @@ -1785,7 +1793,7 @@ int main(int argc, const char *argv[]) */ write_pid_file(); - if (setuid(pw->pw_uid)) + if ((NULL != pw) && setuid(pw->pw_uid)) { log_error(LOG_LEVEL_FATAL, "Cannot setuid(): Insufficient permissions."); }