diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-05-27 16:55:30 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:17:12 -0500 |
commit | 8135f23112fbf8800ae56ed1222f0dc005b37653 (patch) | |
tree | e685984a56642dea9f0b62b28fc96a0cd190d954 /source3/modules | |
parent | 883241c76bed0b547230b5b3f08f7629ceaafdc7 (diff) | |
download | samba-8135f23112fbf8800ae56ed1222f0dc005b37653.tar.gz samba-8135f23112fbf8800ae56ed1222f0dc005b37653.tar.bz2 samba-8135f23112fbf8800ae56ed1222f0dc005b37653.zip |
r15909: Implement recycle:subdir_mode
(This used to be commit 4dd8694a250e4d064a790fe8f422c965ab533880)
Diffstat (limited to 'source3/modules')
-rw-r--r-- | source3/modules/vfs_recycle.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source3/modules/vfs_recycle.c b/source3/modules/vfs_recycle.c index 7b2b15171e..42f2f51416 100644 --- a/source3/modules/vfs_recycle.c +++ b/source3/modules/vfs_recycle.c @@ -181,6 +181,23 @@ static mode_t recycle_directory_mode(vfs_handle_struct *handle) return (mode_t)dirmode; } +static mode_t recycle_subdir_mode(vfs_handle_struct *handle) +{ + int dirmode; + const char *buff; + + buff = lp_parm_const_string(SNUM(handle->conn), "recycle", "subdir_mode", NULL); + + if (buff != NULL ) { + sscanf(buff, "%o", &dirmode); + } else { + dirmode=recycle_directory_mode(handle); + } + + DEBUG(10, ("recycle: subdir_mode = %o\n", dirmode)); + return (mode_t)dirmode; +} + static BOOL recycle_directory_exist(vfs_handle_struct *handle, const char *dname) { SMB_STRUCT_STAT st; @@ -270,6 +287,7 @@ static BOOL recycle_create_dir(vfs_handle_struct *handle, const char *dname) } } safe_strcat(new_dir, "/", len); + mode = recycle_subdir_mode(handle); } ret = True; |