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

version» Context lines:

Roxen.git/server/modules/filesystems/filesystem.pike:1318:    }       if (query("no_symlinks") &&    ((contains_symlinks(path, f)) ||    (contains_symlinks(path, id->misc->move_from)))) {    errors++;    TRACE_LEAVE("MV: Contains symlinks. Permission denied");    return Roxen.http_status(403, "Permission denied.");    }    -  // FIXME: What about moving of directories containing locked files? +  // NB: Consider the case of moving of directories containing locked files.    if (mapping(string:mixed) ret = -  write_access(({ f, relative_from }), 0, id)) { +  write_access(({ f, relative_from }), 1, id)) {    TRACE_LEAVE("MV: Locked");    return ret;    }       SETUID_TRACE("Moving file", 0);       code = mv(movefrom, norm_f);    int err_code = errno();    privs = 0;   
Roxen.git/server/modules/filesystems/filesystem.pike:1407:       if (query("no_symlinks") &&    ((contains_symlinks(path, norm_f)) ||    (contains_symlinks(path, moveto)))) {    privs = 0;    errors++;    TRACE_LEAVE("MOVE: Contains symlinks. Permission denied");    return Roxen.http_status(403, "Permission denied.");    }    +  // NB: Consider the case of moving of directories containing locked files.    mapping(string:mixed) ret = -  write_access(({ combine_path(f, "../"), f, new_uri }), 0, id); +  write_access(({ combine_path(f, "../"), f, new_uri }), 1, id);    if (ret) {    TRACE_LEAVE("MOVE: Locked");    return ret;    }    -  size = _file_size(moveto,id); +  size = _file_size(new_uri, id);       SETUID_TRACE("Moving file", 0);       if (size != -1) {    // Destination exists.       int(0..1) overwrite =    !id->request_headers->overwrite ||    id->request_headers->overwrite == "T";    if (!overwrite) {