s3: introduce a new share config option "durable handles" defaulting to "yes"
authorMichael Adam <obnox@samba.org>
Thu, 6 Sep 2012 12:23:26 +0000 (14:23 +0200)
committerStefan Metzmacher <metze@samba.org>
Sat, 8 Sep 2012 17:46:08 +0000 (19:46 +0200)
This is in order to be able to turn durable handles off and on on a per share
basis.

Note: This is only used in combination with:

kernel share modes = no
kernel oplocks = no
posix locking = no

Which means CIFS/SMB2 only access.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
lib/param/param_functions.c
lib/param/param_table.c
source3/include/proto.h
source3/param/loadparm.c

index 3b39e8876724bc0af9ae6588f8c88cb2f0b3e734..bf6863e76d564b04e7a44adf74b1ab4defa4fc58 100644 (file)
@@ -156,6 +156,7 @@ FN_LOCAL_CHAR(magicchar, magic_char)
 FN_LOCAL_STRING(cups_options, szCupsOptions)
 FN_LOCAL_PARM_BOOL(change_notify, bChangeNotify)
 FN_LOCAL_PARM_BOOL(kernel_change_notify, bKernelChangeNotify)
+FN_LOCAL_BOOL(durable_handles, bDurableHandles)
 
 FN_GLOBAL_BOOL(allow_insecure_widelinks, bAllowInsecureWidelinks)
 FN_GLOBAL_BOOL(allow_trusted_domains, bAllowTrustedDomains)
index 23489ae01f9e974e65b7255afbcd76d24ccb6af0..060608a831bbf5f3c75ca83149926e2653b474ea 100644 (file)
@@ -1763,6 +1763,15 @@ static struct parm_struct parm_table[] = {
                .special        = NULL,
                .enum_list      = NULL
        },
+       {
+               .label          = "durable handles",
+               .type           = P_BOOL,
+               .p_class        = P_LOCAL,
+               .offset         = LOCAL_VAR(bDurableHandles),
+               .special        = NULL,
+               .enum_list      = NULL,
+               .flags          = FLAG_ADVANCED,
+       },
 
        {N_("Tuning Options"), P_SEP, P_SEPARATOR},
 
index 44b9d716e5c7f13fccfbe94bd9c16a1ec20ad3da..6dbdf4eae1049f25cd573a1e2ef0a2676e9408e5 100644 (file)
@@ -1327,6 +1327,7 @@ bool lp_afs_share(int );
 bool lp_acl_check_permissions(int );
 bool lp_acl_group_control(int );
 bool lp_acl_map_full_control(int );
+bool lp_durable_handles(int);
 int lp_create_mask(int );
 int lp_force_create_mode(int );
 int lp_security_mask(int );
index 563d6446a00de405b1dce12fdba887144a6716bd..f1999ad81714705f7c75a4adde8f82c15f16b225 100644 (file)
@@ -282,6 +282,7 @@ static struct loadparm_service sDefault =
 #endif
        .ismb_encrypt = SMB_SIGNING_DEFAULT,
        .bKernelShareModes = true,
+       .bDurableHandles = true,
        .param_opt = NULL,
        .dummy = ""
 };