From 3a5cc58fde0d53d83d46e37f80670ad6bd67f892 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 8 Jun 2006 20:07:34 +0000 Subject: r16104: Set version to 3.0.23rc2 Bring release tree up to current 3.0 tree (svn merge -r15845:16103 $SVNURL/branches/SAMBA_3_0) --- source/modules/vfs_recycle.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'source/modules/vfs_recycle.c') diff --git a/source/modules/vfs_recycle.c b/source/modules/vfs_recycle.c index 7b2b15171e4..42f2f51416e 100644 --- a/source/modules/vfs_recycle.c +++ b/source/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; -- cgit