param: Make "kernel change notify" global
authorVolker Lendecke <vl@samba.org>
Fri, 21 Nov 2014 15:02:27 +0000 (16:02 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 7 Jul 2015 21:51:24 +0000 (23:51 +0200)
With a central notifyd, we can't do this per share anymore. Notifyd will
only look at absolute paths, not shares.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
docs-xml/smbdotconf/misc/kernelchangenotify.xml
lib/param/param_table.c
source3/modules/vfs_default.c
source3/param/loadparm.c

index 1e11bb8dcd2410a21ca4ad3ede18bd2e75e64ff4..6a41dcb29343e8ab1da93685be135f312aca0bb5 100644 (file)
@@ -1,7 +1,6 @@
 <samba:parameter name="kernel change notify"
-                 context="S"
+                 context="G"
                                 type="boolean"
-                 parm="1"
                  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
 <description>
        <para>This parameter specifies whether Samba should ask the 
index 9a5881fb82bae1d6815d2b846c13c1d686a348cc..0fdd50dad192976a705b4ec062579732088764b9 100644 (file)
@@ -1676,8 +1676,8 @@ struct parm_struct parm_table[] = {
        {
                .label          = "kernel change notify",
                .type           = P_BOOL,
-               .p_class        = P_LOCAL,
-               .offset         = LOCAL_VAR(kernel_change_notify),
+               .p_class        = P_GLOBAL,
+               .offset         = GLOBAL_VAR(kernel_change_notify),
                .special        = NULL,
                .enum_list      = NULL,
        },
index 69826348d5c92b82d4157970fc87b4bf3b58352d..fcf3de5f7bbe3ee8865ceca081ad15d8eac4e903 100644 (file)
@@ -2151,7 +2151,7 @@ static NTSTATUS vfswrap_notify_watch(vfs_handle_struct *vfs_handle,
         * Until that is the case, hard-code inotify here.
         */
 #ifdef HAVE_INOTIFY
-       if (lp_kernel_change_notify(vfs_handle->conn->params)) {
+       if (lp_kernel_change_notify()) {
                int ret;
                if (!lp_parm_bool(-1, "notify", "inotify", True)) {
                        return NT_STATUS_INVALID_SYSTEM_SERVICE;
index 4228b390ea3ea2dacc5aad19460652d4a0b1bfbd..7dd8786ae392c51b34e22e54e20d236ff15bb9c5 100644 (file)
@@ -239,7 +239,6 @@ static struct loadparm_service sDefault =
        .acl_map_full_control = true,
        .acl_group_control = false,
        .acl_allow_execute_always = false,
-       .kernel_change_notify = true,
        .allocation_roundup_size = SMB_ROUNDUP_ALLOCATION_SIZE,
        .aio_read_size = 0,
        .aio_write_size = 0,
@@ -722,6 +721,7 @@ static void init_globals(struct loadparm_context *lp_ctx, bool reinit_globals)
        Globals.hostname_lookups = false;
 
        Globals.change_notify = true,
+       Globals.kernel_change_notify = true,
 
        string_set(Globals.ctx, &Globals.passdb_backend, "tdbsam");
        string_set(Globals.ctx, &Globals.ldap_suffix, "");