summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Sharpe <sharpe@samba.org>1998-10-06 23:46:01 +0000
committerRichard Sharpe <sharpe@samba.org>1998-10-06 23:46:01 +0000
commit1398feebbcb65a9e78b7084811bf9727b6d89682 (patch)
treecc4694a527dc2d7cc045bc10ba679121527e2365
parenteb279cabd059603b6c8d9b74e4fd31c4ffe87593 (diff)
downloadsamba-1398feebbcb65a9e78b7084811bf9727b6d89682.tar.gz
Added capability for smbclient to use the local WINS server on the same
machine if WINSsupport configured
-rw-r--r--source/client/client.c3
-rw-r--r--source/param/loadparm.c9
2 files changed, 7 insertions, 5 deletions
diff --git a/source/client/client.c b/source/client/client.c
index 436b0c3c7c1..a6a3be73382 100644
--- a/source/client/client.c
+++ b/source/client/client.c
@@ -27,6 +27,7 @@
#define REGISTER 0
#endif
+extern BOOL in_client;
pstring cur_dir = "\\";
pstring cd_path = "";
extern BOOL in_client;
@@ -3790,7 +3791,7 @@ static void usage(char *pname)
DEBUG(0,("Failed to get my hostname.\n"));
}
- in_client = True;
+ in_client = True; /* Make sure that we tell lp_load we are */
if (!lp_load(servicesf,True,False,False)) {
fprintf(stderr, "Can't load %s - run testparm to debug it\n", servicesf);
diff --git a/source/param/loadparm.c b/source/param/loadparm.c
index b0b793df601..ad8e27be982 100644
--- a/source/param/loadparm.c
+++ b/source/param/loadparm.c
@@ -67,6 +67,7 @@
BOOL in_client = False; /* Not in the client by default */
BOOL bLoaded = False;
+BOOL in_client = False;
extern int DEBUGLEVEL;
extern pstring user_socket_options;
@@ -2485,8 +2486,10 @@ 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 */
+ bLoaded = True;
+
+ /* Now we check bWINSsupport and set szWINSserver to 127.0.0.1 */
+ /* if bWINSsupport is true and we are in the client */
if (in_client && Globals.bWINSsupport) {
@@ -2494,8 +2497,6 @@ BOOL lp_load(char *pszFname,BOOL global_only, BOOL save_defaults, BOOL add_ipc)
}
- bLoaded = True;
-
return (bRetval);
}