Remove last instance of global_loadparm.
authorJelmer Vernooij <jelmer@samba.org>
Sun, 2 Nov 2008 18:32:50 +0000 (19:32 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Sun, 2 Nov 2008 18:32:50 +0000 (19:32 +0100)
source4/ntvfs/sysdep/inotify.c
source4/ntvfs/sysdep/sys_notify.c

index 68653d60bd9393b16ac9685dec47dbd2151d4956..c47a1216c881301fbfa57e0c1761f42f107906e5 100644 (file)
@@ -339,10 +339,6 @@ static NTSTATUS inotify_watch(struct sys_notify_context *ctx,
        /* maybe setup the inotify fd */
        if (ctx->private_data == NULL) {
                NTSTATUS status;
-               if (!lp_parm_bool(global_loadparm, NULL, "notify", "inotify", true)) {
-                       return NT_STATUS_INVALID_SYSTEM_SERVICE;
-               }
-
                status = inotify_setup(ctx);
                NT_STATUS_NOT_OK_RETURN(status);
        }
index d84979e44cea32bd286a2c471c18d252d57f7ce0..a27386bb130081cedc6fd7edaacccc7ae4817707 100644 (file)
@@ -71,6 +71,17 @@ _PUBLIC_ struct sys_notify_context *sys_notify_context_create(struct share_confi
        }
 
        for (i=0;i<num_backends;i++) {
+               char *enable_opt_name;
+               bool enabled;
+               
+               enable_opt_name = talloc_asprintf(mem_ctx, "notify:%s", 
+                                                                                 backends[i].name);
+               enabled = share_bool_option(scfg, enable_opt_name, true);
+               talloc_free(enable_opt_name);
+
+               if (!enabled) 
+                       continue;
+
                if (strcasecmp(backends[i].name, bname) == 0) {
                        bname = backends[i].name;
                        break;