svn commit: samba r7542 - in branches/SAMBA_3_0/source/modules: .
jra at samba.org
jra at samba.org
Mon Jun 13 17:41:52 GMT 2005
Author: jra
Date: 2005-06-13 17:41:52 +0000 (Mon, 13 Jun 2005)
New Revision: 7542
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7542
Log:
Patch from Renaud Duhaut <rd at duhaut.com> for a parameter
"directory_mode" when creating recycle directories.
Bug #1040.
Jeremy.
Modified:
branches/SAMBA_3_0/source/modules/vfs_recycle.c
Changeset:
Modified: branches/SAMBA_3_0/source/modules/vfs_recycle.c
===================================================================
--- branches/SAMBA_3_0/source/modules/vfs_recycle.c 2005-06-13 16:49:57 UTC (rev 7541)
+++ branches/SAMBA_3_0/source/modules/vfs_recycle.c 2005-06-13 17:41:52 UTC (rev 7542)
@@ -153,6 +153,23 @@
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 @@
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);
More information about the samba-cvs
mailing list