Branch: Tag:

2000-11-02

2000-11-02 08:30:38 by Per Hedbor <ph@opera.com>

Moved some defines around. Easy-to-uncomment debug for security level checking

Rev: server/base_server/configuration.pike:1.387

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>
663: Inside #if defined(MODULE_LEVEL_SECURITY)
   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;   
2170:    }    }    -  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,
2240:    me->definvisvar("_seclvl", -10, TYPE_INT); /* A very low one */    }    } + #endif    } else {    me->defvar("_priority", 0, "", TYPE_INT, "", 0, 1);    }