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 - 2004, 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.151 2005/10/19 12:22:09 grubba Exp $"; + constant cvs_version= "$Id: filesystem.pike,v 1.152 2005/12/13 15:45:59 anders 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:397:      // We support locking if put is enabled.   mapping(string:mixed) lock_file(string path, DAVLock lock, RequestID id)   {    if (!query("put")) return 0;    if (query("check_auth") && (!id->conf->authenticate( id )) ) {    TRACE_LEAVE("LOCK: Permission denied");    return    // FIXME: Sane realm.    Roxen.http_auth_required("foo", -  "<h1>Permission to 'LOCK' files denied</h1>"); +  "<h1>Permission to 'LOCK' files denied</h1>", +  id);    }    register_lock(path, lock, id);    return 0;   }      mapping(string:mixed) unlock_file(string path, DAVLock lock, RequestID|int(0..0) id)   {    if (!query("put")) return 0;    if (id && query("check_auth") && (!id->conf->authenticate( id )) ) {    TRACE_LEAVE("UNLOCK: Permission denied");    return    // FIXME: Sane realm.    Roxen.http_auth_required("foo", -  "<h1>Permission to 'UNLOCK' files denied</h1>"); +  "<h1>Permission to 'UNLOCK' files denied</h1>", +  id);    }    unregister_lock(path, lock, id);    return 0;   }      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:440:    RequestID id)   {    SIMPLE_TRACE_ENTER(this, "write_access(%O, %O, %O)\n", path, recursive, id);    if(query("check_auth") && (!id->conf->authenticate( id ) ) ) {    SIMPLE_TRACE_LEAVE("%s: Authentication required.", id->method);    // FIXME: Sane realm.    // FIXME: Recursion and htaccess?    return    Roxen.http_auth_required("foo",    sprintf("<h1>Permission to '%s' denied</h1>", -  id->method)); +  id->method), id);    }    TRACE_LEAVE("Fall back to the default write access checks.");    return ::write_access(path, recursive, id);   }      array find_dir( string f, RequestID id )   {    array dir;       FILESYSTEM_WERR("find_dir for \""+f+"\"" +