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 - 2000, Roxen IS.      // 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 "socket";    - constant cvs_version= "$Id: filesystem.pike,v 1.91 2000/11/27 06:17:14 per Exp $"; + constant cvs_version= "$Id: filesystem.pike,v 1.92 2000/12/29 15:09:18 grubba Exp $";   constant thread_safe=1;      #include <module.h>   #include <roxen.h>   #include <stat.h>   #include <request_trace.h>         //<locale-token project="mod_filesystem">LOCALE</locale-token>   #define LOCALE(X,Y) _DEF_LOCALE("mod_filesystem",X,Y)
Roxen.git/server/modules/filesystems/filesystem.pike:226:    /* No security currently in this function */    fs = file_stat(decode_path(path + f));    privs = 0;    if(!stat_cache) return fs;    cache_set("stat_cache", path+f, ({fs}));    return fs;   }      string real_file( string f, RequestID id )   { -  if(stat_file( f, id )) +  if(local::stat_file( f, id ))    return path + f;   }      int dir_filter_function(string f, RequestID id)   {    if(f[0]=='.' && !dotfiles) return 0;    if(!tilde && Roxen.backup_extension(f)) return 0;    return 1;   }   
Roxen.git/server/modules/filesystems/filesystem.pike:879:       if(!sizeof(id->misc["new-uri"] || "")) {    id->misc->error_code = 405;    errors++;    TRACE_LEAVE("MOVE: No dest file");    return 0;    }    string new_uri = combine_path(URI + "/../",    id->misc["new-uri"]);    +  // FIXME: The code below doesn't allow for this module being overloaded.    if (new_uri[..sizeof(mountpoint)-1] != mountpoint) {    id->misc->error_code = 405;    TRACE_LEAVE("MOVE: Dest file on other filesystem.");    return(0);    }    string moveto = path + "/" + new_uri[sizeof(mountpoint)..];       if (FILTER_INTERNAL_FILE (f, id) ||    FILTER_INTERNAL_FILE (moveto, id)) {    id->misc->error_code = 405;