From 6d98076c15e8726606da0a99714cd3382d82f9ac Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 3 Apr 2006 06:46:55 +0000 Subject: r14877: added support for the kernel inotify mechanism. This passes basic tests, but still needs some more work to ensure we correctly cope with events that may generate both a system inotify event and a internal notify event. The system inotify events won't handle recursion, and don't understand things like streams. This also adds the ntvfs/sysdep/ directory, which is meant for system dependent code that is not tied to a particular ntvfs backend. The inotify code is a good example of that. (This used to be commit eadadbb44adb3c4081d6ff1d85a9b850a0227059) --- source4/ntvfs/sysdep/sys_notify.c | 96 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 source4/ntvfs/sysdep/sys_notify.c (limited to 'source4/ntvfs/sysdep/sys_notify.c') diff --git a/source4/ntvfs/sysdep/sys_notify.c b/source4/ntvfs/sysdep/sys_notify.c new file mode 100644 index 0000000000..aedfd2a7de --- /dev/null +++ b/source4/ntvfs/sysdep/sys_notify.c @@ -0,0 +1,96 @@ +/* + Unix SMB/CIFS implementation. + + Copyright (C) Andrew Tridgell 2006 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +/* + abstract the various kernel interfaces to change notify into a + single Samba friendly interface +*/ + +#include "includes.h" +#include "system/filesys.h" +#include "ntvfs/sysdep/sys_notify.h" +#include "lib/events/events.h" +#include "dlinklist.h" + +/* list of registered backends */ +static struct sys_notify_backend *backends; + + +/* + initialise a system change notify backend +*/ +struct sys_notify_context *sys_notify_init(int snum, + TALLOC_CTX *mem_ctx, + struct event_context *ev) +{ + struct sys_notify_context *ctx; + const char *bname; + struct sys_notify_backend *b; + + if (backends == NULL) { + return NULL; + } + + if (ev == NULL) { + ev = event_context_find(mem_ctx); + } + + ctx = talloc_zero(mem_ctx, struct sys_notify_context); + if (ctx == NULL) { + return NULL; + } + + ctx->ev = ev; + + bname = lp_parm_string(snum, "notify", "backend"); + if (bname == NULL) { + bname = backends->name; + } + + for (b=backends;b;b=b->next) { + if (strcasecmp(b->name, bname) == 0) break; + } + + if (b != NULL) { + ctx->name = b->name; + ctx->notify_watch = b->notify_watch; + } + + return ctx; +} + +/* + add a watch +*/ +NTSTATUS sys_notify_watch(struct sys_notify_context *ctx, const char *dirpath, + uint32_t filter, sys_notify_callback_t callback, + void *private, void **handle) +{ + return ctx->notify_watch(ctx, dirpath, filter, callback, private, handle); +} + +/* + register a notify backend +*/ +NTSTATUS sys_notify_register(struct sys_notify_backend *backend) +{ + DLIST_ADD(backends, backend); + return NT_STATUS_OK; +} -- cgit From 770edafbf2e284b246fb29e936a19476eacde87f Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 4 Apr 2006 16:58:28 +0000 Subject: r14912: don't crash if inotify isn't present... metze (This used to be commit 953aa7887b310117a05a59291f3770a9beb5e1eb) --- source4/ntvfs/sysdep/sys_notify.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'source4/ntvfs/sysdep/sys_notify.c') diff --git a/source4/ntvfs/sysdep/sys_notify.c b/source4/ntvfs/sysdep/sys_notify.c index aedfd2a7de..fd29f42a0e 100644 --- a/source4/ntvfs/sysdep/sys_notify.c +++ b/source4/ntvfs/sysdep/sys_notify.c @@ -44,10 +44,6 @@ struct sys_notify_context *sys_notify_init(int snum, const char *bname; struct sys_notify_backend *b; - if (backends == NULL) { - return NULL; - } - if (ev == NULL) { ev = event_context_find(mem_ctx); } @@ -60,16 +56,25 @@ struct sys_notify_context *sys_notify_init(int snum, ctx->ev = ev; bname = lp_parm_string(snum, "notify", "backend"); - if (bname == NULL) { - bname = backends->name; + if (!bname) { + if (backends) { + bname = backends->name; + } else { + bname = "__unknown__"; + } } for (b=backends;b;b=b->next) { - if (strcasecmp(b->name, bname) == 0) break; + if (strcasecmp(b->name, bname) == 0) { + bname = b->name; + break; + } } + ctx->name = bname; + ctx->notify_watch = NULL; + if (b != NULL) { - ctx->name = b->name; ctx->notify_watch = b->notify_watch; } @@ -83,6 +88,9 @@ NTSTATUS sys_notify_watch(struct sys_notify_context *ctx, const char *dirpath, uint32_t filter, sys_notify_callback_t callback, void *private, void **handle) { + if (!ctx->notify_watch) { + return NT_STATUS_NOT_IMPLEMENTED; + } return ctx->notify_watch(ctx, dirpath, filter, callback, private, handle); } -- cgit From a9cb173f7674d311624c34205f1417b31972d1f2 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 5 Apr 2006 04:50:08 +0000 Subject: r14918: cleaner handling of systems without inotify (This used to be commit cf17ff15b15942f0ce068dd0a94b3b565a9b93cb) --- source4/ntvfs/sysdep/sys_notify.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/ntvfs/sysdep/sys_notify.c') diff --git a/source4/ntvfs/sysdep/sys_notify.c b/source4/ntvfs/sysdep/sys_notify.c index fd29f42a0e..1927ac61ce 100644 --- a/source4/ntvfs/sysdep/sys_notify.c +++ b/source4/ntvfs/sysdep/sys_notify.c @@ -44,6 +44,10 @@ struct sys_notify_context *sys_notify_init(int snum, const char *bname; struct sys_notify_backend *b; + if (backends == NULL) { + return NULL; + } + if (ev == NULL) { ev = event_context_find(mem_ctx); } -- cgit From 416d7b421001d00c4d494fceb4f2d0ab3e30cfaf Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 5 Apr 2006 05:54:10 +0000 Subject: r14920: allow a notify backend to separately specify if it has handled the given mask for the current directory and sub-directories. This allows us to setup the less efficient internal handling for subdirectories, while using the kernel inotify service for the current directory if available. It also allows inotify to handle only some of the filter bits, leaving the other filter bits for the user space handler. (This used to be commit 7c3d989fa44c7f57853a825337159f476d7dff80) --- source4/ntvfs/sysdep/sys_notify.c | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) (limited to 'source4/ntvfs/sysdep/sys_notify.c') diff --git a/source4/ntvfs/sysdep/sys_notify.c b/source4/ntvfs/sysdep/sys_notify.c index 1927ac61ce..1be57dd55a 100644 --- a/source4/ntvfs/sysdep/sys_notify.c +++ b/source4/ntvfs/sysdep/sys_notify.c @@ -31,7 +31,7 @@ /* list of registered backends */ static struct sys_notify_backend *backends; - +static uint32_t num_backends; /* initialise a system change notify backend @@ -43,8 +43,9 @@ struct sys_notify_context *sys_notify_init(int snum, struct sys_notify_context *ctx; const char *bname; struct sys_notify_backend *b; + int i; - if (backends == NULL) { + if (num_backends == 0) { return NULL; } @@ -61,16 +62,16 @@ struct sys_notify_context *sys_notify_init(int snum, bname = lp_parm_string(snum, "notify", "backend"); if (!bname) { - if (backends) { - bname = backends->name; + if (num_backends) { + bname = backends[0].name; } else { bname = "__unknown__"; } } - for (b=backends;b;b=b->next) { - if (strcasecmp(b->name, bname) == 0) { - bname = b->name; + for (i=0;iname = bname; ctx->notify_watch = NULL; - if (b != NULL) { - ctx->notify_watch = b->notify_watch; + if (i < num_backends) { + ctx->notify_watch = backends[i].notify_watch; } return ctx; @@ -87,15 +88,18 @@ struct sys_notify_context *sys_notify_init(int snum, /* add a watch + + note that this call must modify the e->filter and e->subdir_filter + bits to remove ones handled by this backend. Any remaining bits will + be handled by the generic notify layer */ -NTSTATUS sys_notify_watch(struct sys_notify_context *ctx, const char *dirpath, - uint32_t filter, sys_notify_callback_t callback, - void *private, void **handle) +NTSTATUS sys_notify_watch(struct sys_notify_context *ctx, struct notify_entry *e, + sys_notify_callback_t callback, void *private, void **handle) { if (!ctx->notify_watch) { return NT_STATUS_NOT_IMPLEMENTED; } - return ctx->notify_watch(ctx, dirpath, filter, callback, private, handle); + return ctx->notify_watch(ctx, e, callback, private, handle); } /* @@ -103,6 +107,12 @@ NTSTATUS sys_notify_watch(struct sys_notify_context *ctx, const char *dirpath, */ NTSTATUS sys_notify_register(struct sys_notify_backend *backend) { - DLIST_ADD(backends, backend); + struct sys_notify_backend *b; + b = talloc_realloc(talloc_autofree_context(), backends, + struct sys_notify_backend, num_backends+1); + NT_STATUS_HAVE_NO_MEMORY(b); + backends = b; + backends[num_backends] = *backend; + num_backends++; return NT_STATUS_OK; } -- cgit From 930e247d5692cc776c434f9caafa90f2ca1a70b1 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 5 Apr 2006 08:52:03 +0000 Subject: r14925: trigger NOTIFY_ACTION_OLD_NAME and NOTIFY_ACTION_NEW_NAME events for renames, if in the same directory. For renames between directories generate NOTIFY_ACTION_REMOVED and NOTIFY_ACTION_ADDED (This used to be commit 2ac248edf05c3ee715165f2b33055de480743e87) --- source4/ntvfs/sysdep/sys_notify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/ntvfs/sysdep/sys_notify.c') diff --git a/source4/ntvfs/sysdep/sys_notify.c b/source4/ntvfs/sysdep/sys_notify.c index 1be57dd55a..85831c80e9 100644 --- a/source4/ntvfs/sysdep/sys_notify.c +++ b/source4/ntvfs/sysdep/sys_notify.c @@ -97,7 +97,7 @@ NTSTATUS sys_notify_watch(struct sys_notify_context *ctx, struct notify_entry *e sys_notify_callback_t callback, void *private, void **handle) { if (!ctx->notify_watch) { - return NT_STATUS_NOT_IMPLEMENTED; + return NT_STATUS_INVALID_SYSTEM_SERVICE; } return ctx->notify_watch(ctx, e, callback, private, handle); } -- cgit From 127967334fbf3851debacbc0f2574461b542cbad Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 7 Apr 2006 10:36:54 +0000 Subject: r14956: change the notify search to be much more efficient by using a per-depth bisection search. This makes the notify_trigger() call log(N) which makes us scale well for large numbers of outstanding notifies (This used to be commit 16fd00925fdbf77e7a403ad501bf6ea429404c76) --- source4/ntvfs/sysdep/sys_notify.c | 1 - 1 file changed, 1 deletion(-) (limited to 'source4/ntvfs/sysdep/sys_notify.c') diff --git a/source4/ntvfs/sysdep/sys_notify.c b/source4/ntvfs/sysdep/sys_notify.c index 85831c80e9..13c8f4359a 100644 --- a/source4/ntvfs/sysdep/sys_notify.c +++ b/source4/ntvfs/sysdep/sys_notify.c @@ -42,7 +42,6 @@ struct sys_notify_context *sys_notify_init(int snum, { struct sys_notify_context *ctx; const char *bname; - struct sys_notify_backend *b; int i; if (num_backends == 0) { -- cgit From 2e894625e7c951b5ee66670124b4bef82a8129d9 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 7 Apr 2006 13:15:46 +0000 Subject: r14964: - move sidmap code from ntvfs_common to SAMDB - make ntvfs_common a library - create sys_notify library metze (This used to be commit a3e1d56cf7b688c515f5d6d4d43e0b24c2261d15) --- source4/ntvfs/sysdep/sys_notify.c | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'source4/ntvfs/sysdep/sys_notify.c') diff --git a/source4/ntvfs/sysdep/sys_notify.c b/source4/ntvfs/sysdep/sys_notify.c index 13c8f4359a..a74312f32b 100644 --- a/source4/ntvfs/sysdep/sys_notify.c +++ b/source4/ntvfs/sysdep/sys_notify.c @@ -28,6 +28,7 @@ #include "ntvfs/sysdep/sys_notify.h" #include "lib/events/events.h" #include "dlinklist.h" +#include "build.h" /* list of registered backends */ static struct sys_notify_backend *backends; @@ -36,9 +37,9 @@ static uint32_t num_backends; /* initialise a system change notify backend */ -struct sys_notify_context *sys_notify_init(int snum, - TALLOC_CTX *mem_ctx, - struct event_context *ev) +struct sys_notify_context *sys_notify_context_create(int snum, + TALLOC_CTX *mem_ctx, + struct event_context *ev) { struct sys_notify_context *ctx; const char *bname; @@ -115,3 +116,23 @@ NTSTATUS sys_notify_register(struct sys_notify_backend *backend) num_backends++; return NT_STATUS_OK; } + +NTSTATUS sys_notify_init(void) +{ + static BOOL initialized = False; + + init_module_fn static_init[] = STATIC_sys_notify_MODULES; + init_module_fn *shared_init; + + if (initialized) return NT_STATUS_OK; + initialized = True; + + shared_init = load_samba_modules(NULL, "sys_notify"); + + run_init_functions(static_init); + run_init_functions(shared_init); + + talloc_free(shared_init); + + return NT_STATUS_OK; +} -- cgit From 7672505c72c34a5e35dc05cf3fdc0d49e974a690 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 7 Apr 2006 14:14:27 +0000 Subject: r14966: make more functions _PUBLIC_ metze (This used to be commit 193f7da254cce40ab30fda9e99b8cd07e0b0a0a8) --- source4/ntvfs/sysdep/sys_notify.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source4/ntvfs/sysdep/sys_notify.c') diff --git a/source4/ntvfs/sysdep/sys_notify.c b/source4/ntvfs/sysdep/sys_notify.c index a74312f32b..c4fa4647d1 100644 --- a/source4/ntvfs/sysdep/sys_notify.c +++ b/source4/ntvfs/sysdep/sys_notify.c @@ -37,9 +37,9 @@ static uint32_t num_backends; /* initialise a system change notify backend */ -struct sys_notify_context *sys_notify_context_create(int snum, - TALLOC_CTX *mem_ctx, - struct event_context *ev) +_PUBLIC_ struct sys_notify_context *sys_notify_context_create(int snum, + TALLOC_CTX *mem_ctx, + struct event_context *ev) { struct sys_notify_context *ctx; const char *bname; @@ -93,8 +93,8 @@ struct sys_notify_context *sys_notify_context_create(int snum, bits to remove ones handled by this backend. Any remaining bits will be handled by the generic notify layer */ -NTSTATUS sys_notify_watch(struct sys_notify_context *ctx, struct notify_entry *e, - sys_notify_callback_t callback, void *private, void **handle) +_PUBLIC_ NTSTATUS sys_notify_watch(struct sys_notify_context *ctx, struct notify_entry *e, + sys_notify_callback_t callback, void *private, void **handle) { if (!ctx->notify_watch) { return NT_STATUS_INVALID_SYSTEM_SERVICE; @@ -105,7 +105,7 @@ NTSTATUS sys_notify_watch(struct sys_notify_context *ctx, struct notify_entry *e /* register a notify backend */ -NTSTATUS sys_notify_register(struct sys_notify_backend *backend) +_PUBLIC_ NTSTATUS sys_notify_register(struct sys_notify_backend *backend) { struct sys_notify_backend *b; b = talloc_realloc(talloc_autofree_context(), backends, @@ -117,7 +117,7 @@ NTSTATUS sys_notify_register(struct sys_notify_backend *backend) return NT_STATUS_OK; } -NTSTATUS sys_notify_init(void) +_PUBLIC_ NTSTATUS sys_notify_init(void) { static BOOL initialized = False; -- cgit From 9c66f601f1520a99b9236c32bc9f03a33bd4b2aa Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sun, 23 Jul 2006 18:43:07 +0000 Subject: r17206: Add a modular API for share configuration. Commit the classic backwards compatible module which is the default one (This used to be commit a89cc346b9296cb49929898d257a064a6c2bae86) --- source4/ntvfs/sysdep/sys_notify.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source4/ntvfs/sysdep/sys_notify.c') diff --git a/source4/ntvfs/sysdep/sys_notify.c b/source4/ntvfs/sysdep/sys_notify.c index c4fa4647d1..3f4f08203e 100644 --- a/source4/ntvfs/sysdep/sys_notify.c +++ b/source4/ntvfs/sysdep/sys_notify.c @@ -34,10 +34,12 @@ static struct sys_notify_backend *backends; static uint32_t num_backends; +#define NOTIFY_BACKEND "notify-backend" + /* initialise a system change notify backend */ -_PUBLIC_ struct sys_notify_context *sys_notify_context_create(int snum, +_PUBLIC_ struct sys_notify_context *sys_notify_context_create(struct share_config *scfg, TALLOC_CTX *mem_ctx, struct event_context *ev) { @@ -60,7 +62,7 @@ _PUBLIC_ struct sys_notify_context *sys_notify_context_create(int snum, ctx->ev = ev; - bname = lp_parm_string(snum, "notify", "backend"); + bname = share_string_option(scfg, NOTIFY_BACKEND, NULL); if (!bname) { if (num_backends) { bname = backends[0].name; -- cgit From 0329d755a7611ba3897fc1ee9bdce410cc33d7f8 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 30 Aug 2006 11:29:34 +0000 Subject: r17930: Merge noinclude branch: * Move dlinklist.h, smb.h to subsystem-specific directories * Clean up ads.h and move what is left of it to dsdb/ (only place where it's used) (This used to be commit f7afa1cb77f3cfa7020b57de12e6003db7cfcc42) --- source4/ntvfs/sysdep/sys_notify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/ntvfs/sysdep/sys_notify.c') diff --git a/source4/ntvfs/sysdep/sys_notify.c b/source4/ntvfs/sysdep/sys_notify.c index 3f4f08203e..765b4a39a5 100644 --- a/source4/ntvfs/sysdep/sys_notify.c +++ b/source4/ntvfs/sysdep/sys_notify.c @@ -27,7 +27,7 @@ #include "system/filesys.h" #include "ntvfs/sysdep/sys_notify.h" #include "lib/events/events.h" -#include "dlinklist.h" +#include "lib/util/dlinklist.h" #include "build.h" /* list of registered backends */ -- cgit From 1fbb49a3e7ed78582e283060b6624c57f30d13dd Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 28 Jan 2007 17:03:10 +0000 Subject: r21041: Change some "private" to "private_data", and change one (void **) function parameter to (void *). void** in function parameters leads to type-punned warnings. Volker (This used to be commit 57979d89c53b4363e4b447205703579df6756653) --- source4/ntvfs/sysdep/sys_notify.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source4/ntvfs/sysdep/sys_notify.c') diff --git a/source4/ntvfs/sysdep/sys_notify.c b/source4/ntvfs/sysdep/sys_notify.c index 765b4a39a5..1c0467236a 100644 --- a/source4/ntvfs/sysdep/sys_notify.c +++ b/source4/ntvfs/sysdep/sys_notify.c @@ -95,13 +95,15 @@ _PUBLIC_ struct sys_notify_context *sys_notify_context_create(struct share_confi bits to remove ones handled by this backend. Any remaining bits will be handled by the generic notify layer */ -_PUBLIC_ NTSTATUS sys_notify_watch(struct sys_notify_context *ctx, struct notify_entry *e, - sys_notify_callback_t callback, void *private, void **handle) +_PUBLIC_ NTSTATUS sys_notify_watch(struct sys_notify_context *ctx, + struct notify_entry *e, + sys_notify_callback_t callback, + void *private_data, void *handle) { if (!ctx->notify_watch) { return NT_STATUS_INVALID_SYSTEM_SERVICE; } - return ctx->notify_watch(ctx, e, callback, private, handle); + return ctx->notify_watch(ctx, e, callback, private_data, handle); } /* -- cgit From d1984d5cf3dd43b3bbc214dd8c091b5fc2a86a46 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 4 Jul 2007 04:18:44 +0000 Subject: r23698: fixed notify:backend so it actually works again (This used to be commit d49ce1d752fdf6a6e1d6b9da12e7afb7d385ef8c) --- source4/ntvfs/sysdep/sys_notify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/ntvfs/sysdep/sys_notify.c') diff --git a/source4/ntvfs/sysdep/sys_notify.c b/source4/ntvfs/sysdep/sys_notify.c index 1c0467236a..cae07a1e69 100644 --- a/source4/ntvfs/sysdep/sys_notify.c +++ b/source4/ntvfs/sysdep/sys_notify.c @@ -34,7 +34,7 @@ static struct sys_notify_backend *backends; static uint32_t num_backends; -#define NOTIFY_BACKEND "notify-backend" +#define NOTIFY_BACKEND "notify:backend" /* initialise a system change notify backend -- cgit From 0479a2f1cbae51fcd8dbdc3c148c808421fb4d25 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 02:07:03 +0000 Subject: r23792: convert Samba4 to GPLv3 There are still a few tidyups of old FSF addresses to come (in both s3 and s4). More commits soon. (This used to be commit fcf38a38ac691abd0fa51b89dc951a08e89fdafa) --- source4/ntvfs/sysdep/sys_notify.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source4/ntvfs/sysdep/sys_notify.c') diff --git a/source4/ntvfs/sysdep/sys_notify.c b/source4/ntvfs/sysdep/sys_notify.c index cae07a1e69..8d2aed7fa0 100644 --- a/source4/ntvfs/sysdep/sys_notify.c +++ b/source4/ntvfs/sysdep/sys_notify.c @@ -5,7 +5,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -14,8 +14,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program. If not, see . */ /* -- cgit From ffeee68e4b72dd94fee57366bd8d38b8c284c3d4 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 8 Sep 2007 12:42:09 +0000 Subject: r25026: Move param/param.h out of includes.h (This used to be commit abe8349f9b4387961ff3665d8c589d61cd2edf31) --- source4/ntvfs/sysdep/sys_notify.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/ntvfs/sysdep/sys_notify.c') diff --git a/source4/ntvfs/sysdep/sys_notify.c b/source4/ntvfs/sysdep/sys_notify.c index 8d2aed7fa0..53ac7faa7e 100644 --- a/source4/ntvfs/sysdep/sys_notify.c +++ b/source4/ntvfs/sysdep/sys_notify.c @@ -27,6 +27,7 @@ #include "ntvfs/sysdep/sys_notify.h" #include "lib/events/events.h" #include "lib/util/dlinklist.h" +#include "param/param.h" #include "build.h" /* list of registered backends */ -- cgit From 2f3551ca7cee59d4d053cceb87abdf1da1b3a1ad Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 1 Oct 2007 18:52:55 +0000 Subject: r25446: Merge some changes I made on the way home from SFO: 2007-09-29 More higher-level passing around of lp_ctx. 2007-09-29 Fix warning. 2007-09-29 Pass loadparm contexts on a higher level. 2007-09-29 Avoid using global loadparm context. (This used to be commit 3468952e771ab31f90b6c374ade01c5550810f42) --- source4/ntvfs/sysdep/sys_notify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/ntvfs/sysdep/sys_notify.c') diff --git a/source4/ntvfs/sysdep/sys_notify.c b/source4/ntvfs/sysdep/sys_notify.c index 53ac7faa7e..a13d02c12e 100644 --- a/source4/ntvfs/sysdep/sys_notify.c +++ b/source4/ntvfs/sysdep/sys_notify.c @@ -131,7 +131,7 @@ _PUBLIC_ NTSTATUS sys_notify_init(void) if (initialized) return NT_STATUS_OK; initialized = True; - shared_init = load_samba_modules(NULL, "sys_notify"); + shared_init = load_samba_modules(NULL, global_loadparm, "sys_notify"); run_init_functions(static_init); run_init_functions(shared_init); -- cgit From 2151cde58014ea2e822c13d2f8a369b45dc19ca8 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 6 Oct 2007 22:28:14 +0000 Subject: r25554: Convert last instances of BOOL, True and False to the standard types. (This used to be commit 566aa14139510788548a874e9213d91317f83ca9) --- source4/ntvfs/sysdep/sys_notify.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/ntvfs/sysdep/sys_notify.c') diff --git a/source4/ntvfs/sysdep/sys_notify.c b/source4/ntvfs/sysdep/sys_notify.c index a13d02c12e..1664461d33 100644 --- a/source4/ntvfs/sysdep/sys_notify.c +++ b/source4/ntvfs/sysdep/sys_notify.c @@ -123,13 +123,13 @@ _PUBLIC_ NTSTATUS sys_notify_register(struct sys_notify_backend *backend) _PUBLIC_ NTSTATUS sys_notify_init(void) { - static BOOL initialized = False; + static bool initialized = false; init_module_fn static_init[] = STATIC_sys_notify_MODULES; init_module_fn *shared_init; if (initialized) return NT_STATUS_OK; - initialized = True; + initialized = true; shared_init = load_samba_modules(NULL, global_loadparm, "sys_notify"); -- cgit From be33f4c611d37ebba59ff618033dc73601339ad1 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 23 Dec 2007 23:54:30 -0600 Subject: r26576: Allow the static module loading code to be used for the Python modules. Simplify the way module initialization functions are handled. (This used to be commit ba8be2dfc0de4434c798663336b81f7f95cde520) --- source4/ntvfs/sysdep/sys_notify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/ntvfs/sysdep/sys_notify.c') diff --git a/source4/ntvfs/sysdep/sys_notify.c b/source4/ntvfs/sysdep/sys_notify.c index 1664461d33..a6d0a698bc 100644 --- a/source4/ntvfs/sysdep/sys_notify.c +++ b/source4/ntvfs/sysdep/sys_notify.c @@ -125,7 +125,7 @@ _PUBLIC_ NTSTATUS sys_notify_init(void) { static bool initialized = false; - init_module_fn static_init[] = STATIC_sys_notify_MODULES; + init_module_fn static_init[] = { STATIC_sys_notify_MODULES, NULL }; init_module_fn *shared_init; if (initialized) return NT_STATUS_OK; -- cgit From c13ae707313c5bf9819a75c1699d099565d2494d Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 24 Dec 2007 01:28:22 -0600 Subject: r26580: Include sentinel in build.h, in case the list is empty. (This used to be commit f1997dabed584bdc864c4b7235c29603c312ef46) --- source4/ntvfs/sysdep/sys_notify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/ntvfs/sysdep/sys_notify.c') diff --git a/source4/ntvfs/sysdep/sys_notify.c b/source4/ntvfs/sysdep/sys_notify.c index a6d0a698bc..2ed9908af7 100644 --- a/source4/ntvfs/sysdep/sys_notify.c +++ b/source4/ntvfs/sysdep/sys_notify.c @@ -125,7 +125,7 @@ _PUBLIC_ NTSTATUS sys_notify_init(void) { static bool initialized = false; - init_module_fn static_init[] = { STATIC_sys_notify_MODULES, NULL }; + init_module_fn static_init[] = { STATIC_sys_notify_MODULES }; init_module_fn *shared_init; if (initialized) return NT_STATUS_OK; -- cgit From df408d056ec03f2abe08ce0ea487e1875b90e7bf Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 5 Jan 2008 19:03:43 -0600 Subject: r26672: Janitorial: Remove uses of global_loadparm. (This used to be commit 18cd08623eaad7d2cd63b82ea5275d4dfd21cf00) --- source4/ntvfs/sysdep/sys_notify.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'source4/ntvfs/sysdep/sys_notify.c') diff --git a/source4/ntvfs/sysdep/sys_notify.c b/source4/ntvfs/sysdep/sys_notify.c index 2ed9908af7..84ba745f5b 100644 --- a/source4/ntvfs/sysdep/sys_notify.c +++ b/source4/ntvfs/sysdep/sys_notify.c @@ -126,17 +126,11 @@ _PUBLIC_ NTSTATUS sys_notify_init(void) static bool initialized = false; init_module_fn static_init[] = { STATIC_sys_notify_MODULES }; - init_module_fn *shared_init; if (initialized) return NT_STATUS_OK; initialized = true; - shared_init = load_samba_modules(NULL, global_loadparm, "sys_notify"); - run_init_functions(static_init); - run_init_functions(shared_init); - - talloc_free(shared_init); return NT_STATUS_OK; } -- cgit From 2bf39edc9d0abf3306bd25b9c40d88aceb029be7 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 8 Mar 2008 15:28:12 +0100 Subject: Push SOVERSION and VERSION out of perl code. (This used to be commit 0ba8ac6a14c62ff9edfe9f0bf43b8a7406b85291) --- source4/ntvfs/sysdep/sys_notify.c | 1 - 1 file changed, 1 deletion(-) (limited to 'source4/ntvfs/sysdep/sys_notify.c') diff --git a/source4/ntvfs/sysdep/sys_notify.c b/source4/ntvfs/sysdep/sys_notify.c index 84ba745f5b..e5d6c75f71 100644 --- a/source4/ntvfs/sysdep/sys_notify.c +++ b/source4/ntvfs/sysdep/sys_notify.c @@ -28,7 +28,6 @@ #include "lib/events/events.h" #include "lib/util/dlinklist.h" #include "param/param.h" -#include "build.h" /* list of registered backends */ static struct sys_notify_backend *backends; -- cgit From fb6fdfce37a91021c346a52bd7d55a5ee576580a Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 8 Mar 2008 17:02:40 +0100 Subject: Fix the build. (This used to be commit f2e49744717eb46bbfafeea9e2eb412a38a142e7) --- source4/ntvfs/sysdep/sys_notify.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/ntvfs/sysdep/sys_notify.c') diff --git a/source4/ntvfs/sysdep/sys_notify.c b/source4/ntvfs/sysdep/sys_notify.c index e5d6c75f71..c628b9068c 100644 --- a/source4/ntvfs/sysdep/sys_notify.c +++ b/source4/ntvfs/sysdep/sys_notify.c @@ -123,6 +123,7 @@ _PUBLIC_ NTSTATUS sys_notify_register(struct sys_notify_backend *backend) _PUBLIC_ NTSTATUS sys_notify_init(void) { static bool initialized = false; + extern NTSTATUS sys_notify_inotify_init(void); init_module_fn static_init[] = { STATIC_sys_notify_MODULES }; -- cgit From f78bc8c489b02b521e9ecbdbdc72d160c6911b6b Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 14 Apr 2008 11:54:50 +0200 Subject: Remove prototypes from build.h in preparation of removing build.h altogether. (This used to be commit dbeab2a9cdee4e5f69afeb2603ba29cbed56debd) --- source4/ntvfs/sysdep/sys_notify.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/ntvfs/sysdep/sys_notify.c') diff --git a/source4/ntvfs/sysdep/sys_notify.c b/source4/ntvfs/sysdep/sys_notify.c index 84ba745f5b..eb5cc3793f 100644 --- a/source4/ntvfs/sysdep/sys_notify.c +++ b/source4/ntvfs/sysdep/sys_notify.c @@ -124,6 +124,7 @@ _PUBLIC_ NTSTATUS sys_notify_register(struct sys_notify_backend *backend) _PUBLIC_ NTSTATUS sys_notify_init(void) { static bool initialized = false; + extern NTSTATUS sys_notify_inotify_init(void); init_module_fn static_init[] = { STATIC_sys_notify_MODULES }; -- cgit From c15ffa27cb3a1cadbbf06d564146c1ab8dec952b Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 17 Apr 2008 01:19:53 +0200 Subject: Explicitly require event context to be specified. (This used to be commit a95a71fe45ef6a578569931a7c38061783d07db3) --- source4/ntvfs/sysdep/sys_notify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/ntvfs/sysdep/sys_notify.c') diff --git a/source4/ntvfs/sysdep/sys_notify.c b/source4/ntvfs/sysdep/sys_notify.c index eb5cc3793f..22b72c4d63 100644 --- a/source4/ntvfs/sysdep/sys_notify.c +++ b/source4/ntvfs/sysdep/sys_notify.c @@ -52,7 +52,7 @@ _PUBLIC_ struct sys_notify_context *sys_notify_context_create(struct share_confi } if (ev == NULL) { - ev = event_context_find(mem_ctx); + return NULL; } ctx = talloc_zero(mem_ctx, struct sys_notify_context); -- cgit