summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/include/proto.h1
-rw-r--r--source3/nmbd/nmbd.c8
-rw-r--r--source3/param/loadparm.c4
3 files changed, 11 insertions, 2 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index c53ad6971a..355526c799 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1643,6 +1643,7 @@ BOOL lp_restrict_anonymous(void);
BOOL lp_lanman_auth(void);
BOOL lp_host_msdfs(void);
BOOL lp_kernel_oplocks(void);
+BOOL lp_enhanced_browsing(void);
int lp_os_level(void);
int lp_max_ttl(void);
int lp_max_wins_ttl(void);
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c
index 32d66d39fd..5e8e7e1ec6 100644
--- a/source3/nmbd/nmbd.c
+++ b/source3/nmbd/nmbd.c
@@ -460,7 +460,9 @@ static void process(void)
* This will only work to a Samba WINS server.
* (nmbd_browsesync.c)
*/
- collect_all_workgroup_names_from_wins_server(t);
+ if (lp_enhanced_browsing()) {
+ collect_all_workgroup_names_from_wins_server(t);
+ }
/*
* Go through the response record queue and time out or re-transmit
@@ -477,7 +479,9 @@ static void process(void)
/*
* regularly sync with any other DMBs we know about
*/
- sync_all_dmbs(t);
+ if (lp_enhanced_browsing()) {
+ sync_all_dmbs(t);
+ }
/*
* clear the unexpected packet queue
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 64393b4082..ccc967234b 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -194,6 +194,7 @@ typedef struct
int iTotalPrintJobs;
int syslog;
int os_level;
+ int enhanced_browsing;
int max_ttl;
int max_wins_ttl;
int min_wins_ttl;
@@ -908,6 +909,7 @@ static struct parm_struct parm_table[] = {
{"browse list", P_BOOL, P_GLOBAL, &Globals.bBrowseList, NULL, NULL, 0},
{"browseable", P_BOOL, P_LOCAL, &sDefault.bBrowseable, NULL, NULL, FLAG_BASIC | FLAG_SHARE | FLAG_PRINT},
{"browsable", P_BOOL, P_LOCAL, &sDefault.bBrowseable, NULL, NULL, 0},
+ {"enhanced browsing", P_BOOL, P_GLOBAL, &Globals.enhanced_browsing, NULL, NULL},
{"WINS Options", P_SEP, P_SEPARATOR},
{"dns proxy", P_BOOL, P_GLOBAL, &Globals.bDNSproxy, NULL, NULL, 0},
@@ -1280,6 +1282,7 @@ static void init_globals(void)
Globals.map_to_guest = 0; /* By Default, "Never" */
Globals.min_passwd_length = MINPASSWDLENGTH; /* By Default, 5. */
Globals.oplock_break_wait_time = 0; /* By Default, 0 msecs. */
+ Globals.enhanced_browsing = True;
#ifdef WITH_LDAP
/* default values for ldap */
@@ -1537,6 +1540,7 @@ FN_GLOBAL_BOOL(lp_restrict_anonymous, &Globals.bRestrictAnonymous)
FN_GLOBAL_BOOL(lp_lanman_auth, &Globals.bLanmanAuth)
FN_GLOBAL_BOOL(lp_host_msdfs, &Globals.bHostMSDfs)
FN_GLOBAL_BOOL(lp_kernel_oplocks, &Globals.bKernelOplocks)
+FN_GLOBAL_BOOL(lp_enhanced_browsing, &Globals.enhanced_browsing)
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)