- user web: when creating cache dir, chmod() so that

protections are right regardless of umask.
    From Nicolas Alvarez; fixes #344

svn path=/trunk/boinc/; revision=14435
This commit is contained in:
David Anderson 2007-12-21 21:01:13 +00:00
parent 9248b47032
commit f211caf8ae
2 changed files with 13 additions and 1 deletions

View File

@ -12438,3 +12438,11 @@ David 21 Dec 2007
boinc_api.C
sched/
delete_file.C
David 21 Dec 2007
- user web: when creating cache dir, chmod() so that
protections are right regardless of umask.
From Nicolas Alvarez; fixes #344
html/inc/
cache.inc

View File

@ -11,11 +11,15 @@ if (function_exists("apache_request_headers")) {
// mechanism for caching commonly-accessed pages
function make_cache_dirs() {
if (!@filemtime("../cache")) mkdir("../cache", 0770);
if (!@filemtime("../cache")) {
mkdir("../cache", 0770);
chmod("../cache", 0770);
}
for ($i=0;$i<256;$i++) {
$j=sprintf("%02x",$i);
if (!@filemtime("../cache/$j")) {
mkdir("../cache/$j", 0770);
chmod("../cache/$j", 0770);
}
}
}