summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--source3/modules/vfs_default.c3
-rw-r--r--source3/smbd/notify_inotify.c4
2 files changed, 3 insertions, 4 deletions
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index f5b8f9be11..dad6bb7440 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 5fbc7f22ee..554277cabe 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();