Roxen.git / server / base_server / roxen.pike

version» Context lines:

Roxen.git/server/base_server/roxen.pike:1:   // This file is part of Roxen WebServer.   // Copyright © 1996 - 2001, Roxen IS.   //   // The Roxen WebServer main program.   //   // Per Hedbor, Henrik Grubbström, Pontus Hagland, David Hedbor and others.   // ABS and suicide systems contributed freely by Francesco Chemolli    - constant cvs_version="$Id: roxen.pike,v 1.822 2003/02/05 13:33:58 jonasw Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.823 2003/03/03 18:07:47 grubba Exp $";      //! @appears roxen   //!   //! The Roxen WebServer main program.      // The argument cache. Used by the image cache.   ArgCache argcache;      // Some headerfiles   #define IN_ROXEN
Roxen.git/server/base_server/roxen.pike:56:   #else   # define SSL3_WERR(X)   #endif      #ifdef THREAD_DEBUG   # define THREAD_WERR(X) report_debug("Thread: "+X+"\n")   #else   # define THREAD_WERR(X)   #endif    + // Needed to get core dumps of seteuid()'ed processes on Linux. + #if constant(System.dumpable) + #define enable_coredumps(X) System.dumpable(X) + #else + #define enable_coredumps(X) + #endif +    #define DDUMP(X) sol( combine_path( __FILE__, "../../" + X ), dump )   static function sol = master()->set_on_load;      #ifdef TEST_EUID_CHANGE   int test_euid_change;   #endif      string md5( string what )   {    return Gmp.mpz(Crypto.md5()->update( what )->digest(),256)
Roxen.git/server/base_server/roxen.pike:280: Inside #if defined(HAVE_EFFECTIVE_USER)
   if (err < 0) {    report_debug("Privs: Failed\n");    error ("Failed to set EGID to %d\n", gid);    }    report_debug("Privs: WARNING: Set egid to %d instead of %d.\n",    gid2, gid);    gid = gid2;    }    if(getgid()!=gid) setgid(gid||getgid());    seteuid(new_uid = uid); +  enable_coredumps(1);   #endif /* HAVE_EFFECTIVE_USER */    }       void destroy()    {    // No need for Privs if the uid has been changed permanently.    if(getuid()) return;      #ifdef PRIVS_DEBUG    report_debug(sprintf("Privs->destroy()\n"
Roxen.git/server/base_server/roxen.pike:353: Inside #if defined(HAVE_EFFECTIVE_USER)
   seteuid(0);    array u = getpwuid(saved_uid);   #if efun(cleargroups)    catch { cleargroups(); };   #endif /* cleargroups */    if(u && (sizeof(u) > 3)) {    catch { initgroups(u[0], u[3]); };    }    setegid(saved_gid);    seteuid(saved_uid); +  enable_coredumps(1);   #endif /* HAVE_EFFECTIVE_USER */    }   #else /* efun(seteuid) */    void create(string reason, int|string|void uid, int|string|void gid){}   #endif /* efun(seteuid) */   }      /* Used by read_config.pike, since there seems to be problems with    * overloading otherwise.    */
Roxen.git/server/base_server/roxen.pike:1700: Inside #if constant(SSL.sslfile)
   {    report_error(LOC_M(15,"SSL3: Private dsa key not valid")+" (DER).\n");    return;    }       SSL3_WERR(sprintf("Using DSA key."));       dsa->use_random(r);    ctx->dsa = dsa;    /* Use default DH parameters */ + #if constant(SSL.Cipher) +  ctx->dh_params = SSL.Cipher.DHParameters(); + #else    ctx->dh_params = SSL.cipher.dh_parameters(); -  + #endif       ctx->dhe_dss_mode();       // FIXME: Add cert <-> private key check.       ctx->certificates = ({ cert }) + ctx->certificates;    }    else    {    report_error(LOC_M(17,"SSL3: No private key found.")+"\n");
Roxen.git/server/base_server/roxen.pike:3892:    if (u && !from_handler_thread)    report_notice(CALL_M("setting_uid_gid", "eng")(uid, gid, u, g));   #else    if (!from_handler_thread)    report_warning(LOC_M(32, "Setting effective uid not supported on "    "this system.")+"\n");    u = g = 0;   #endif    }    +  enable_coredumps(1); +    #ifdef THREADS    // Paranoia.    mutex_key = 0;    threads_disabled = 0;   #endif       return !!u;    }    }   #endif