param: Make "change notify" global
authorVolker Lendecke <vl@samba.org>
Fri, 21 Nov 2014 14:53:53 +0000 (15:53 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 7 Jul 2015 21:51:23 +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/changenotify.xml
lib/param/param_table.c
source3/param/loadparm.c
source3/smbd/service.c

index 1344dce71b2d286e0c564b6c7bbff13721ad8d4a..70793d68a4c175b98e1cdac68f1cc54279c2400a 100644 (file)
@@ -1,7 +1,6 @@
 <samba:parameter name="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 reply
index 148f79c6df4118868b5771f82a815a281b55bd5c..9a5881fb82bae1d6815d2b846c13c1d686a348cc 100644 (file)
@@ -1660,8 +1660,8 @@ struct parm_struct parm_table[] = {
        {
                .label          = "change notify",
                .type           = P_BOOL,
-               .p_class        = P_LOCAL,
-               .offset         = LOCAL_VAR(change_notify),
+               .p_class        = P_GLOBAL,
+               .offset         = GLOBAL_VAR(change_notify),
                .special        = NULL,
                .enum_list      = NULL,
        },
index af74d68fee5ece421bdf4e63b08074df3e529aeb..4228b390ea3ea2dacc5aad19460652d4a0b1bfbd 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,
-       .change_notify = true,
        .kernel_change_notify = true,
        .allocation_roundup_size = SMB_ROUNDUP_ALLOCATION_SIZE,
        .aio_read_size = 0,
@@ -722,6 +721,8 @@ static void init_globals(struct loadparm_context *lp_ctx, bool reinit_globals)
           a large number of sites (tridge) */
        Globals.hostname_lookups = false;
 
+       Globals.change_notify = true,
+
        string_set(Globals.ctx, &Globals.passdb_backend, "tdbsam");
        string_set(Globals.ctx, &Globals.ldap_suffix, "");
        string_set(Globals.ctx, &Globals.szLdapMachineSuffix, "");
index d1148e1bc4033b1a715a2ae673247dd7f5792cce..05449672fb740fa7a5ab2ce98e0662950f2a5b0e 100644 (file)
@@ -678,7 +678,7 @@ static NTSTATUS make_connection_snum(struct smbXsrv_connection *xconn,
        on_err_call_dis_hook = true;
 
        if ((!conn->printer) && (!conn->ipc) &&
-           lp_change_notify(conn->params)) {
+           lp_change_notify()) {
                if (sconn->notify_ctx == NULL) {
                        sconn->notify_ctx = notify_init(
                                sconn, sconn->msg_ctx, sconn->ev_ctx);