Branch: Tag:

1998-02-04

1998-02-04 16:10:52 by Per Hedbor <ph@opera.com>

Added profining, removed 4711 Privs, added call_out workaround

Rev: server/base_server/configuration.pike:1.92
Rev: server/base_server/disk_cache.pike:1.33
Rev: server/base_server/privs.pike:1.32
Rev: server/base_server/read_config.pike:1.18
Rev: server/base_server/roxen.pike:1.163
Rev: server/base_server/roxenloader.pike:1.55
Rev: server/config_actions/generate_rsa.pike:1.5
Rev: server/modules/filesystems/filesystem.pike:1.26
Rev: server/modules/filesystems/restrictedfs.pike:1.7
Rev: server/modules/filesystems/userfs.pike:1.17
Rev: server/modules/graphics/business_graphics/business.pike:1.63
Rev: server/modules/graphics/graphic_text.pike:1.99
Rev: server/modules/misc/ip-less_hosts.pike:1.8
Rev: server/modules/misc/mirrorserver.pike:1.13
Rev: server/modules/misc/userdb.pike:1.23
Rev: server/modules/scripting/cgi.pike:1.70
Rev: server/modules/scripting/pikescript.pike:1.20
Rev: server/modules/tags/htmlparse.pike:1.74
Rev: server/protocols/ftp.pike:1.77
Rev: server/protocols/http.pike:1.52
Rev: server/start:1.25

4:   // It will be located somewhere in the name-space of the server.   // Also inherited by some of the other filesystems.    - string cvs_version= "$Id: filesystem.pike,v 1.25 1998/01/04 07:25:54 peter Exp $"; + constant cvs_version= "$Id: filesystem.pike,v 1.26 1998/02/04 16:10:42 per Exp $";   int thread_safe=1;      
18:   # endif   #endif    - #if !constant(Privs) - constant Privs=((program)"privs"); - #endif /* !constant(Privs) */ -  +    inherit "module";   inherit "roxenlib";   inherit "socket";
123:      void start()   { + #ifdef THREADS +  if(QUERY(access_as_user)) +  report_warning("It is not possible to use 'Access as user' when " +  "running with threads. Remove -DENABLE_THREADS from " +  "the start script if you really need this function\n"); + #endif +     path = QUERY(searchpath);    stat_cache = QUERY(stat_cache);   #ifdef FILESYSTEM_DEBUG
144:    return fs;       object privs; -  + #ifndef THREADS    if (((int)id->misc->uid) && ((int)id->misc->gid) &&    (QUERY(access_as_user))) {    // NB: Root-access is prevented.    privs=Privs("Statting file", (int)id->misc->uid, (int)id->misc->gid );    } -  + #endif +     fs = file_stat(path + f); /* No security currently in this function */    privs = 0;    if(!stat_cache)
180:       object privs;    + #ifndef THREADS    if (((int)id->misc->uid) && ((int)id->misc->gid) &&    (QUERY(access_as_user))) {    // NB: Root-access is prevented.    privs=Privs("Getting dir", (int)id->misc->uid, (int)id->misc->gid );    } -  + #endif       if(!(dir = get_dir( path + f ))) {    privs = 0;
318:       object privs;    + #ifndef THREADS    if (((int)id->misc->uid) && ((int)id->misc->gid) &&    (QUERY(access_as_user))) {    // NB: Root-access is prevented.    privs=Privs("Getting file", (int)id->misc->uid, (int)id->misc->gid );    } -  + #endif       o = open( f, "r" );   
360:       object privs;    + // #ifndef THREADS // Ouch. This is is _needed_. Well well...    if (((int)id->misc->uid) && ((int)id->misc->gid)) {    // NB: Root-access is prevented.    privs=Privs("Saving file", (int)id->misc->uid, (int)id->misc->gid );    } -  + // #endif       if (QUERY(no_symlinks) && (contains_symlinks(path, oldf))) {    privs = 0;