smbd: Move lp_parm_bool out of notify_inotify.c
authorVolker Lendecke <vl@samba.org>
Mon, 27 Oct 2014 10:26:46 +0000 (10:26 +0000)
committerJeremy Allison <jra@samba.org>
Tue, 9 Dec 2014 03:12:08 +0000 (04:12 +0100)
Notifyd should be as independent of Samba infrastructure as possible,
and it will call notify_inotify

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_default.c
source3/smbd/notify_inotify.c

index f5b8f9be11dd98493bd29c26586e81a5c54e8ec0..dad6bb7440fa12d6002a902d7996cca5f7d2b3e5 100644 (file)
@@ -2119,6 +2119,9 @@ static NTSTATUS vfswrap_notify_watch(vfs_handle_struct *vfs_handle,
         */
 #ifdef HAVE_INOTIFY
        if (lp_kernel_change_notify(vfs_handle->conn->params)) {
+               if (!lp_parm_bool(-1, "notify", "inotify", True)) {
+                       return NT_STATUS_INVALID_SYSTEM_SERVICE;
+               }
                return inotify_watch(ctx, path, filter, subdir_filter,
                                     callback, private_data, handle);
        }
index 5fbc7f22eede7ceaa896d8c1b63e0c497266e814..554277cabecbc5f01c2a383d4aed48c499415560 100644 (file)
@@ -255,10 +255,6 @@ static NTSTATUS inotify_setup(struct sys_notify_context *ctx)
 {
        struct inotify_private *in;
 
-       if (!lp_parm_bool(-1, "notify", "inotify", True)) {
-               return NT_STATUS_INVALID_SYSTEM_SERVICE;
-       }
-
        in = talloc(ctx, struct inotify_private);
        NT_STATUS_HAVE_NO_MEMORY(in);
        in->fd = inotify_init();