diff options
-rw-r--r-- | source3/modules/vfs_recycle.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/source3/modules/vfs_recycle.c b/source3/modules/vfs_recycle.c index 5ff7931c58..6a9914131d 100644 --- a/source3/modules/vfs_recycle.c +++ b/source3/modules/vfs_recycle.c @@ -153,6 +153,23 @@ static int recycle_maxsize(vfs_handle_struct *handle) return maxsize; } +static mode_t recycle_directory_mode(vfs_handle_struct *handle) +{ + mode_t dirmode; + const char *buff; + + buff = lp_parm_const_string(SNUM(handle->conn), "recycle", "directory_mode", NULL); + + if (buff != NULL ) { + sscanf(buff, "%o", (int *)&dirmode); + } else { + dirmode=S_IRUSR | S_IWUSR | S_IXUSR; + } + + DEBUG(10, ("recycle: directory_mode = %o\n", dirmode)); + return dirmode; +} + static BOOL recycle_directory_exist(vfs_handle_struct *handle, const char *dname) { SMB_STRUCT_STAT st; @@ -213,7 +230,7 @@ static BOOL recycle_create_dir(vfs_handle_struct *handle, const char *dname) char *tok_str; BOOL ret = False; - mode = S_IRUSR | S_IWUSR | S_IXUSR; + mode = recycle_directory_mode(handle); tmp_str = SMB_STRDUP(dname); ALLOC_CHECK(tmp_str, done); |