Roxen.git / server / base_server / configuration.pike

version» Context lines:

Roxen.git/server/base_server/configuration.pike:1:   // A vitual server's main configuration   // Copyright © 1996 - 2000, Roxen IS. - constant cvs_version = "$Id: configuration.pike,v 1.386 2000/10/29 03:40:58 mast Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.387 2000/11/02 08:30:38 per Exp $";   #include <module.h>   #include <module_constants.h>   #include <roxen.h>   #include <request_trace.h>         #define CATCH(P,X) do{mixed e;if(e=catch{X;})report_error("While "+P+"\n"+describe_backtrace(e));}while(0)      // --- Locale defines ---   //<locale-token project="roxen_start"> LOC_S </locale-token>
Roxen.git/server/base_server/configuration.pike:656: Inside #if defined(MODULE_LEVEL_SECURITY)
      if(!(seclevels = misc_cache[ a ])) {    object mod = Roxen.get_owning_module (a);    if(mod && mod->query_seclevels)    misc_cache[ a ] = seclevels = ({    mod->query_seclevels(),    mod->query("_seclvl"),    mod->query("_sec_group")    });    else +  {    misc_cache[ a ] = seclevels = ({({}),0,"foo" });    } -  +  }    -  + // werror("check_security %O %d <-> %d%s\n", a, slevel, seclevels[1], + // (seclevels[-1]=="foo"?" (No module found)":"")); +     if(slevel && (seclevels[1] > slevel)) // "Trustlevel" to low.    return 1;       if(!sizeof(seclevels[0]))    return 0; // Ok if there are no patterns.       mixed err;    err = catch {    foreach(seclevels[0], level) {    switch(level[0]) {
Roxen.git/server/base_server/configuration.pike:2163:    me->defvar("_priority", 5, DLOCALE(12, "Priority"), TYPE_INT_LIST,    DLOCALE(13, "The priority of the module. 9 is highest and 0 is lowest."    " Modules with the same priority can be assumed to be "    "called in random order"),    ({0, 1, 2, 3, 4, 5, 6, 7, 8, 9}));    }) {    throw(err);    }    }    -  if(module_type != MODULE_LOGGER && module_type != MODULE_PROVIDER) + #ifdef MODULE_LEVEL_SECURITY +  if( (module_type & ~(MODULE_LOGGER|MODULE_PROVIDER)) != 0 )    {    me->defvar("_sec_group", "user", DLOCALE(14, "Security: Realm"),    TYPE_STRING,    DLOCALE(15, "The realm to use when requesting password from the "    "client. Usually used as an informative message to the "    "user."));       me->defvar("_seclevels", "", DLOCALE(16, "Security: Patterns"),    TYPE_TEXT_FIELD,    DLOCALE(17, "This is the 'security level=value' list.<br />"
Roxen.git/server/base_server/configuration.pike:2233:    " higher <i>security level</i> than the requests trust"    " level.</p>"    "\n<p>On the other hand, a request handled by the the"    " \"Filsystem module\" could later be handled by the"    " \"CGI module\".</p>"));       } else {    me->definvisvar("_seclvl", -10, TYPE_INT); /* A very low one */    }    } + #endif    } else {    me->defvar("_priority", 0, "", TYPE_INT, "", 0, 1);    }       mapping(string:mixed) stored_vars = retrieve(modname + "#" + id, this_object());    int has_stored_vars = sizeof (stored_vars); // A little ugly, but it suffices.    me->setvars(stored_vars);       module[ id ] = me;    otomod[ me ] = modname+"#"+id;