summaryrefslogtreecommitdiff
path: root/source4/ntvfs/sysdep/sys_notify.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-04-07 13:15:46 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:00:47 -0500
commit2e894625e7c951b5ee66670124b4bef82a8129d9 (patch)
treef0020b62a5e8258bb9b3bb999ec2f9a63c6ec305 /source4/ntvfs/sysdep/sys_notify.c
parent5b1a495e96be6f92df3ba2d30095d879041f757e (diff)
downloadsamba-2e894625e7c951b5ee66670124b4bef82a8129d9.tar.gz
samba-2e894625e7c951b5ee66670124b4bef82a8129d9.tar.bz2
samba-2e894625e7c951b5ee66670124b4bef82a8129d9.zip
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)
Diffstat (limited to 'source4/ntvfs/sysdep/sys_notify.c')
-rw-r--r--source4/ntvfs/sysdep/sys_notify.c27
1 files changed, 24 insertions, 3 deletions
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;
+}