diff options
author | Andrew Tridgell <tridge@samba.org> | 2000-01-07 06:55:36 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2000-01-07 06:55:36 +0000 |
commit | b563be824b8c3141c49558eced7829b48d4ab26f (patch) | |
tree | 8e7ce416231383522648f9af6d3f60fc9d820ab0 /source/lib/util.c | |
parent | bf9b1328c5843eb217eff4ca05645498de2def82 (diff) | |
download | samba-b563be824b8c3141c49558eced7829b48d4ab26f.tar.gz samba-b563be824b8c3141c49558eced7829b48d4ab26f.tar.xz samba-b563be824b8c3141c49558eced7829b48d4ab26f.zip |
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.
Diffstat (limited to 'source/lib/util.c')
-rw-r--r-- | source/lib/util.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source/lib/util.c b/source/lib/util.c index a7c322c0a0f..5063dab9c4e 100644 --- a/source/lib/util.c +++ b/source/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; } } |