From 171da4d78736730557a94b44af9f2d62081b80ba Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 7 Jan 2000 06:55:36 +0000 Subject: this looks like a big commit, but it isn't really :) This fixes our netbios scope handling. We now have a 'netbios scope' option in smb.conf and the scope option is removed from make_nmb_name() this was prompted by a bug in our PDC finding code where it didn't append the scope to the query of the '*' name. (This used to be commit b563be824b8c3141c49558eced7829b48d4ab26f) --- source3/client/client.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'source3/client/client.c') diff --git a/source3/client/client.c b/source3/client/client.c index 8915d197ab..3dc8371bb0 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -42,7 +42,6 @@ static char *cmdstr; static BOOL got_pass; static int io_bufsize = 65520; extern struct in_addr ipzero; -extern pstring scope; static int name_type = 0x20; @@ -1890,8 +1889,8 @@ struct cli_state *do_connect(char *server, char *share) ip = ipzero; - make_nmb_name(&calling, global_myname, 0x0, ""); - make_nmb_name(&called , server, name_type, ""); + make_nmb_name(&calling, global_myname, 0x0); + make_nmb_name(&called , server, name_type); again: ip = ipzero; @@ -1914,7 +1913,7 @@ struct cli_state *do_connect(char *server, char *share) goto again; } if (strcmp(called.name, "*SMBSERVER")) { - make_nmb_name(&called , "*SMBSERVER", 0x20, ""); + make_nmb_name(&called , "*SMBSERVER", 0x20); goto again; } return NULL; @@ -2141,8 +2140,8 @@ static int do_message_op(void) ip = ipzero; - make_nmb_name(&calling, global_myname, 0x0, ""); - make_nmb_name(&called , desthost, name_type, ""); + make_nmb_name(&calling, global_myname, 0x0); + make_nmb_name(&called , desthost, name_type); ip = ipzero; if (have_ip) ip = dest_ip; @@ -2329,7 +2328,11 @@ static int do_message_op(void) message = True; break; case 'i': - pstrcpy(scope,optarg); + { + extern pstring global_scope; + pstrcpy(global_scope,optarg); + strupper(global_scope); + } break; case 'N': got_pass = True; -- cgit