Roxen.git / server / modules / filesystems / filesystem.pike

version» Context lines:

Roxen.git/server/modules/filesystems/filesystem.pike:1:   // This is a roxen module. Copyright © 1996 - 1998, Idonex AB.      // This is a virtual "file-system".   // It will be located somewhere in the name-space of the server.   // Also inherited by some of the other filesystems.      inherit "module";   inherit "roxenlib";   inherit "socket";    - constant cvs_version= "$Id: filesystem.pike,v 1.49 1999/05/23 00:04:04 mast Exp $"; + constant cvs_version= "$Id: filesystem.pike,v 1.50 1999/06/08 03:09:41 hubbe Exp $";   constant thread_safe=1;         #include <module.h>   #include <roxen.h>   #include <stat.h>      #if DEBUG_LEVEL > 20   # ifndef FILESYSTEM_DEBUG   # define FILESYSTEM_DEBUG
Roxen.git/server/modules/filesystems/filesystem.pike:424:       if(QUERY(check_auth) && (!id->auth || !id->auth[0])) {    TRACE_LEAVE("MKDIR: Permission denied");    return http_auth_required("foo",    "<h1>Permission to 'MKDIR' denied</h1>");    }    mkdirs++;    object privs;      // #ifndef THREADS // Ouch. This is is _needed_. Well well... -  if (((int)id->misc->uid) && ((int)id->misc->gid)) { +  if (((int)id->misc->uid) && ((int)id->misc->gid) && +  (QUERY(access_as_user))) {    // NB: Root-access is prevented.    privs=Privs("Creating directory",    (int)id->misc->uid, (int)id->misc->gid );    }   // #endif       if (QUERY(no_symlinks) && (contains_symlinks(path, oldf))) {    privs = 0;    errors++;    report_error("Creation of " + f + " failed. Permission denied.\n");
Roxen.git/server/modules/filesystems/filesystem.pike:475:    if(QUERY(check_auth) && (!id->auth || !id->auth[0])) {    TRACE_LEAVE("PUT: Permission denied");    return http_auth_required("foo",    "<h1>Permission to 'PUT' files denied</h1>");    }    puts++;       object privs;      // #ifndef THREADS // Ouch. This is is _needed_. Well well... -  if (((int)id->misc->uid) && ((int)id->misc->gid)) { +  if (((int)id->misc->uid) && ((int)id->misc->gid) && +  (QUERY(access_as_user))) {    // 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;    errors++;    report_error("Creation of " + f + " failed. Permission denied.\n");    TRACE_LEAVE("PUT: Contains symlinks. Permission denied");
Roxen.git/server/modules/filesystems/filesystem.pike:801:    if (QUERY(no_symlinks) && (contains_symlinks(path, oldf))) {    errors++;    report_error("Deletion of " + f + " failed. Permission denied.\n");    TRACE_LEAVE("DELETE: Contains symlinks");    return http_low_answer(403, "<h2>Permission denied.</h2>");    }       report_notice("DELETING the file "+f+"\n");    accesses++;    -  if (((int)id->misc->uid) && ((int)id->misc->gid)) { +  if (((int)id->misc->uid) && ((int)id->misc->gid) && +  (QUERY(access_as_user))) {    // NB: Root-access is prevented.    privs=Privs("Deleting file", id->misc->uid, id->misc->gid );    }       /* Clear the stat-cache for this file */    if (stat_cache) {    cache_set("stat_cache", f, 0);    }       if(!rm(f))