From 8a4948593840db0823c8f7c0ba4b60f7e07c3340 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 27 Oct 2014 10:26:46 +0000 Subject: [PATCH] smbd: Move lp_parm_bool out of notify_inotify.c Notifyd should be as independent of Samba infrastructure as possible, and it will call notify_inotify Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source3/modules/vfs_default.c | 3 +++ source3/smbd/notify_inotify.c | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index f5b8f9be11d..dad6bb7440f 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -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); } diff --git a/source3/smbd/notify_inotify.c b/source3/smbd/notify_inotify.c index 5fbc7f22eed..554277cabec 100644 --- a/source3/smbd/notify_inotify.c +++ b/source3/smbd/notify_inotify.c @@ -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(); -- 2.11.4.GIT