diff options
Diffstat (limited to '')
| -rw-r--r-- | snac.c | 9 |
1 files changed, 7 insertions, 2 deletions
| @@ -35,8 +35,13 @@ int mkdirx(const char *pathname) | |||
| 35 | { | 35 | { |
| 36 | int ret; | 36 | int ret; |
| 37 | 37 | ||
| 38 | if ((ret = mkdir(pathname, DIR_PERM)) != -1) | 38 | if ((ret = mkdir(pathname, DIR_PERM)) != -1) { |
| 39 | ret = chmod(pathname, DIR_PERM); | 39 | /* try to the set the setgid bit, to allow system users |
| 40 | to create files in these directories using the | ||
| 41 | command-line tool. This may fail in some restricted | ||
| 42 | environments, but it's of no use there anyway */ | ||
| 43 | chmod(pathname, DIR_PERM_ADD); | ||
| 44 | } | ||
| 40 | 45 | ||
| 41 | return ret; | 46 | return ret; |
| 42 | } | 47 | } |