summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/client/client.c3
-rw-r--r--source3/param/loadparm.c10
2 files changed, 13 insertions, 0 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index e34131d6d0..0d27039cb9 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -29,6 +29,7 @@
pstring cur_dir = "\\";
pstring cd_path = "";
+extern BOOL in_client;
extern pstring service;
extern pstring desthost;
extern pstring global_myname;
@@ -3789,6 +3790,8 @@ static void usage(char *pname)
DEBUG(0,("Failed to get my hostname.\n"));
}
+ in_client = True;
+
if (!lp_load(servicesf,True,False,False)) {
fprintf(stderr, "Can't load %s - run testparm to debug it\n", servicesf);
}
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 2fd2212a4c..05ed6484ac 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -65,6 +65,7 @@
#define KANJI "sbcs"
#endif /* KANJI */
+BOOL in_client = False; /* Not in the client by default */
BOOL bLoaded = False;
extern int DEBUGLEVEL;
@@ -2480,6 +2481,15 @@ BOOL lp_load(char *pszFname,BOOL global_only, BOOL save_defaults, BOOL add_ipc)
set_default_server_announce_type();
+ /* We set a WINS server address of 127.0.0.1 if we are in the client */
+ /* and we have WINS support enabled */
+
+ if (in_client && Globals.bWINSsupport) {
+
+ string_set(&Globals.szWINSserver, "127.0.0.1");
+
+ }
+
bLoaded = True;
return (bRetval);