Rev 8849 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8849 | Rev 12474 | ||
---|---|---|---|
Line 20... | Line 20... | ||
20 | 20 | ||
21 | /* The following directories will be relocatable. |
21 | /* The following directories will be relocatable. |
22 | * Clusterable directories (log, backup) should be avoided. |
22 | * Clusterable directories (log, backup) should be avoided. |
23 | */ |
23 | */ |
24 | char *putlist[]={ |
24 | char *putlist[]={ |
25 |
|
25 | "public_html/modules","public_html/modules/devel", |
26 |
|
26 | "public_html/modules/local", |
27 |
|
27 | "public_html/bases","public_html/bases/doc", |
28 |
|
28 | "other" |
29 | }; |
29 | }; |
30 | #define putcnt (sizeof(putlist)/sizeof(putlist[0])) |
30 | #define putcnt (sizeof(putlist)/sizeof(putlist[0])) |
31 | 31 | ||
32 | void homedir(void) |
32 | void homedir(void) |
33 | { |
33 | { |
34 |
|
34 | char buf[MAX_LINELEN+1], fname[4096]; |
35 |
|
35 | char *p1; |
36 |
|
36 | struct stat st; |
37 |
|
37 | int i,t; |
38 |
|
38 | for(i=0;i<putcnt;i++) { |
39 |
|
39 | t=stat(putlist[i],&st); if(t || !S_ISDIR(st.st_mode)) continue; |
40 |
|
40 | snprintf(fname,sizeof(fname),"%s/.wimshome",putlist[i]); |
41 |
|
41 | wlogdaccessfile(buf,"r","%s",fname); |
42 |
|
42 | p1=find_word_start(buf); *find_word_end(p1)=0; |
43 |
|
43 | if(strcmp(p1,cwd)==0) continue; |
44 |
|
44 | wlogdaccessfile(cwd,"w","%s",fname); |
45 |
|
45 | chmod(fname,S_IRUSR|S_IWUSR); |
46 |
|
46 | } |
47 | } |
47 | } |
48 | 48 |