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/lib/util.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'source3/lib/util.c') diff --git a/source3/lib/util.c b/source3/lib/util.c index a7c322c0a0..5063dab9c4 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -58,8 +58,6 @@ extern SSL *ssl; extern int sslFd; #endif /* WITH_SSL */ -pstring scope = ""; - extern int DEBUGLEVEL; int Protocol = PROTOCOL_COREPLUS; @@ -297,6 +295,7 @@ int name_mangle( char *In, char *Out, char name_type ) int len; char buf[20]; char *p = Out; + extern pstring global_scope; /* Safely copy the input string, In, into buf[]. */ (void)memset( buf, 0, 20 ); @@ -320,9 +319,9 @@ int name_mangle( char *In, char *Out, char name_type ) p[0] = '\0'; /* Add the scope string. */ - for( i = 0, len = 0; NULL != scope; i++, len++ ) + for( i = 0, len = 0; NULL != global_scope; i++, len++ ) { - switch( scope[i] ) + switch( global_scope[i] ) { case '\0': p[0] = len; @@ -335,7 +334,7 @@ int name_mangle( char *In, char *Out, char name_type ) len = -1; break; default: - p[len+1] = scope[i]; + p[len+1] = global_scope[i]; break; } } -- cgit