From d0fe43f918eae56d60398231f53266698d732fd7 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 12 Dec 2002 02:01:56 +0000 Subject: Added "kernel change notify" boolean to allow easier valgrind testing. Jeremy. (This used to be commit faf89f214f326bc07f728b354062b2287cda1208) --- source3/param/loadparm.c | 4 ++++ source3/smbd/notify.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 88d5dfed9d..de91e7e2a5 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -262,6 +262,7 @@ typedef struct BOOL bUseSpnego; BOOL bUnixExtensions; BOOL bDisableNetbios; + BOOL bKernelChangeNotify; int restrict_anonymous; int name_cache_timeout; } @@ -848,6 +849,7 @@ static struct parm_struct parm_table[] = { {"deadtime", P_INTEGER, P_GLOBAL, &Globals.deadtime, NULL, NULL, FLAG_DEVELOPER}, {"getwd cache", P_BOOL, P_GLOBAL, &use_getwd_cache, NULL, NULL, FLAG_DEVELOPER}, {"keepalive", P_INTEGER, P_GLOBAL, &keepalive, NULL, NULL, FLAG_ADVANCED | FLAG_DEVELOPER}, + {"kernel change notify", P_BOOL, P_GLOBAL, &Globals.bKernelChangeNotify, NULL, NULL, FLAG_DEVELOPER}, {"lpq cache time", P_INTEGER, P_GLOBAL, &Globals.lpqcachetime, NULL, NULL, FLAG_DEVELOPER}, {"max smbd processes", P_INTEGER, P_GLOBAL, &Globals.iMaxSmbdProcesses, NULL, NULL, FLAG_DEVELOPER}, @@ -1319,6 +1321,7 @@ static void init_globals(void) Globals.min_wins_ttl = 60 * 60 * 6; /* 6 hours default. */ Globals.machine_password_timeout = 60 * 60 * 24 * 7; /* 7 days default. */ Globals.change_notify_timeout = 60; /* 1 minute default. */ + Globals.bKernelChangeNotify = True; /* On if we have it. */ Globals.ReadSize = 16 * 1024; Globals.lm_announce = 2; /* = Auto: send only if LM clients found */ Globals.lm_interval = 60; @@ -1649,6 +1652,7 @@ FN_GLOBAL_BOOL(lp_use_mmap, &Globals.bUseMmap) FN_GLOBAL_BOOL(lp_unix_extensions, &Globals.bUnixExtensions) FN_GLOBAL_BOOL(lp_use_spnego, &Globals.bUseSpnego) FN_GLOBAL_BOOL(lp_hostname_lookups, &Globals.bHostnameLookups) +FN_GLOBAL_BOOL(lp_kernel_change_notify, &Globals.bKernelChangeNotify) FN_GLOBAL_INTEGER(lp_os_level, &Globals.os_level) FN_GLOBAL_INTEGER(lp_max_ttl, &Globals.max_ttl) FN_GLOBAL_INTEGER(lp_max_wins_ttl, &Globals.max_wins_ttl) diff --git a/source3/smbd/notify.c b/source3/smbd/notify.c index 0895ddaf87..de1b331778 100644 --- a/source3/smbd/notify.c +++ b/source3/smbd/notify.c @@ -207,7 +207,8 @@ BOOL change_notify_set(char *inbuf, files_struct *fsp, connection_struct *conn, BOOL init_change_notify(void) { #if HAVE_KERNEL_CHANGE_NOTIFY - cnotify = kernel_notify_init(); + if (lp_kernel_change_notify()) + cnotify = kernel_notify_init(); #endif if (!cnotify) cnotify = hash_notify_init(); -- cgit