diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-06-09 15:31:03 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-06-09 12:40:09 +0200 |
commit | 74eed8f3ed5c333728350df1d23a4318e9104909 (patch) | |
tree | c0e4d64d876400e711bf252b73f4bdb43f0e55c1 /source3/nmbd | |
parent | 0e95311c235929e07fdcfd7153b91ae795a979b9 (diff) | |
download | samba-74eed8f3ed5c333728350df1d23a4318e9104909.tar.gz |
s3-param Remove special case for global_myname(), rename to lp_netbios_name()
There is no reason this can't be a normal constant string in the
loadparm system, now that we have lp_set_cmdline() to handle overrides
correctly.
Andrew Bartlett
Diffstat (limited to 'source3/nmbd')
-rw-r--r-- | source3/nmbd/nmbd_become_dmb.c | 12 | ||||
-rw-r--r-- | source3/nmbd/nmbd_become_lmb.c | 28 | ||||
-rw-r--r-- | source3/nmbd/nmbd_browsesync.c | 4 | ||||
-rw-r--r-- | source3/nmbd/nmbd_elections.c | 8 | ||||
-rw-r--r-- | source3/nmbd/nmbd_incomingdgrams.c | 10 | ||||
-rw-r--r-- | source3/nmbd/nmbd_incomingrequests.c | 10 | ||||
-rw-r--r-- | source3/nmbd/nmbd_logonnames.c | 8 | ||||
-rw-r--r-- | source3/nmbd/nmbd_processlogon.c | 18 | ||||
-rw-r--r-- | source3/nmbd/nmbd_sendannounce.c | 24 | ||||
-rw-r--r-- | source3/nmbd/nmbd_workgroupdb.c | 2 |
10 files changed, 62 insertions, 62 deletions
diff --git a/source3/nmbd/nmbd_become_dmb.c b/source3/nmbd/nmbd_become_dmb.c index 160bcb3c339..276c381f6c8 100644 --- a/source3/nmbd/nmbd_become_dmb.c +++ b/source3/nmbd/nmbd_become_dmb.c @@ -51,10 +51,10 @@ workgroup %s on subnet %s\n", failname, subrec->subnet_name)); /* Set the state back to DOMAIN_NONE. */ work->dom_state = DOMAIN_NONE; - if((servrec = find_server_in_workgroup( work, global_myname())) == NULL) { + if((servrec = find_server_in_workgroup( work, lp_netbios_name())) == NULL) { DEBUG(0,("become_domain_master_fail: Error - cannot find server %s \ in workgroup %s on subnet %s\n", - global_myname(), work->work_group, subrec->subnet_name)); + lp_netbios_name(), work->work_group, subrec->subnet_name)); return; } @@ -92,10 +92,10 @@ workgroup %s on subnet %s\n", regname, subrec->subnet_name)); return; } - if((servrec = find_server_in_workgroup( work, global_myname())) == NULL) { + if((servrec = find_server_in_workgroup( work, lp_netbios_name())) == NULL) { DEBUG(0,("become_domain_master_stage2: Error - cannot find server %s \ in workgroup %s on subnet %s\n", - global_myname(), regname, subrec->subnet_name)); + lp_netbios_name(), regname, subrec->subnet_name)); work->dom_state = DOMAIN_NONE; return; } @@ -110,7 +110,7 @@ in workgroup %s on subnet %s\n", subrec->work_changed = True; if( DEBUGLVL( 0 ) ) { - dbgtext( "*****\n\nSamba server %s ", global_myname() ); + dbgtext( "*****\n\nSamba server %s ", lp_netbios_name() ); dbgtext( "is now a domain master browser for " ); dbgtext( "workgroup %s ", work->work_group ); dbgtext( "on subnet %s\n\n*****\n", subrec->subnet_name ); @@ -126,7 +126,7 @@ in workgroup %s on subnet %s\n", will stop us syncing with ourself if we are also a local master browser. */ - make_nmb_name(&nmbname, global_myname(), 0x20); + make_nmb_name(&nmbname, lp_netbios_name(), 0x20); work->dmb_name = nmbname; diff --git a/source3/nmbd/nmbd_become_lmb.c b/source3/nmbd/nmbd_become_lmb.c index 58dd3eec9ec..f94efd03711 100644 --- a/source3/nmbd/nmbd_become_lmb.c +++ b/source3/nmbd/nmbd_become_lmb.c @@ -85,10 +85,10 @@ subnet %s.\n", workgroup_name, subrec->subnet_name )); return; } - if((servrec = find_server_in_workgroup( work, global_myname())) == NULL) { + if((servrec = find_server_in_workgroup( work, lp_netbios_name())) == NULL) { DEBUG(0,("reset_workgroup_state: Error - cannot find server %s \ in workgroup %s on subnet %s\n", - global_myname(), work->work_group, subrec->subnet_name)); + lp_netbios_name(), work->work_group, subrec->subnet_name)); work->mst_state = lp_local_master() ? MST_POTENTIAL : MST_NONE; return; } @@ -149,7 +149,7 @@ static void unbecome_local_master_success(struct subnet_record *subrec, if( DEBUGLVL( 0 ) ) { dbgtext( "*****\n\n" ); - dbgtext( "Samba name server %s ", global_myname() ); + dbgtext( "Samba name server %s ", lp_netbios_name() ); dbgtext( "has stopped being a local master browser " ); dbgtext( "for workgroup %s ", relname ); dbgtext( "on subnet %s\n\n*****\n", subrec->subnet_name ); @@ -185,7 +185,7 @@ Removing from namelist anyway.\n", nmb_namestr(fail_name))); if( DEBUGLVL( 0 ) ) { dbgtext( "*****\n\n" ); - dbgtext( "Samba name server %s ", global_myname() ); + dbgtext( "Samba name server %s ", lp_netbios_name() ); dbgtext( "has stopped being a local master browser " ); dbgtext( "for workgroup %s ", failname ); dbgtext( "on subnet %s\n\n*****\n", subrec->subnet_name ); @@ -280,10 +280,10 @@ void unbecome_local_master_browser(struct subnet_record *subrec, struct work_rec DEBUG(2,("unbecome_local_master_browser: unbecoming local master for workgroup %s \ on subnet %s\n",work->work_group, subrec->subnet_name)); - if(find_server_in_workgroup( work, global_myname()) == NULL) { + if(find_server_in_workgroup( work, lp_netbios_name()) == NULL) { DEBUG(0,("unbecome_local_master_browser: Error - cannot find server %s \ in workgroup %s on subnet %s\n", - global_myname(), work->work_group, subrec->subnet_name)); + lp_netbios_name(), work->work_group, subrec->subnet_name)); work->mst_state = lp_local_master() ? MST_POTENTIAL : MST_NONE; return; } @@ -342,10 +342,10 @@ workgroup %s on subnet %s\n", regname, subrec->subnet_name)); return; } - if((servrec = find_server_in_workgroup( work, global_myname())) == NULL) { + if((servrec = find_server_in_workgroup( work, lp_netbios_name())) == NULL) { DEBUG(0,("become_local_master_stage2: Error - cannot find server %s \ in workgroup %s on subnet %s\n", - global_myname(), regname, subrec->subnet_name)); + lp_netbios_name(), regname, subrec->subnet_name)); work->mst_state = lp_local_master() ? MST_POTENTIAL : MST_NONE; return; } @@ -363,7 +363,7 @@ on subnet %s\n", work->work_group, subrec->subnet_name)); subrec->work_changed = True; /* Add this name to the workgroup as local master browser. */ - set_workgroup_local_master_browser_name( work, global_myname()); + set_workgroup_local_master_browser_name( work, lp_netbios_name()); /* Count the number of servers we have on our list. If it's less than 10 (just a heuristic) request the servers @@ -396,7 +396,7 @@ on subnet %s\n", work->work_group, subrec->subnet_name)); if( DEBUGLVL( 0 ) ) { dbgtext( "*****\n\n" ); - dbgtext( "Samba name server %s ", global_myname() ); + dbgtext( "Samba name server %s ", lp_netbios_name() ); dbgtext( "is now a local master browser " ); dbgtext( "for workgroup %s ", work->work_group ); dbgtext( "on subnet %s\n\n*****\n", subrec->subnet_name ); @@ -487,10 +487,10 @@ workgroup %s on subnet %s\n", work_name, subrec->subnet_name)); return; } - if(find_server_in_workgroup(work, global_myname()) == NULL) { + if(find_server_in_workgroup(work, lp_netbios_name()) == NULL) { DEBUG(0,("become_local_master_fail1: Error - cannot find server %s \ in workgroup %s on subnet %s\n", - global_myname(), work->work_group, subrec->subnet_name)); + lp_netbios_name(), work->work_group, subrec->subnet_name)); return; } @@ -527,10 +527,10 @@ void become_local_master_browser(struct subnet_record *subrec, struct work_recor return; } - if(find_server_in_workgroup( work, global_myname()) == NULL) { + if(find_server_in_workgroup( work, lp_netbios_name()) == NULL) { DEBUG(0,("become_local_master_browser: Error - cannot find server %s \ in workgroup %s on subnet %s\n", - global_myname(), work->work_group, subrec->subnet_name)); + lp_netbios_name(), work->work_group, subrec->subnet_name)); return; } diff --git a/source3/nmbd/nmbd_browsesync.c b/source3/nmbd/nmbd_browsesync.c index 1a262e4728e..c6ded584e54 100644 --- a/source3/nmbd/nmbd_browsesync.c +++ b/source3/nmbd/nmbd_browsesync.c @@ -119,7 +119,7 @@ static void announce_local_master_browser_to_domain_master_browser( struct work_ SCVAL(p,0,ANN_MasterAnnouncement); p++; - unstrcpy(myname, global_myname()); + unstrcpy(myname, lp_netbios_name()); strupper_m(myname); myname[15]='\0'; /* The call below does CH_UNIX -> CH_DOS conversion. JRA */ @@ -137,7 +137,7 @@ static void announce_local_master_browser_to_domain_master_browser( struct work_ /* Target name for send_mailslot must be in UNIX charset. */ pull_ascii_nstring(dmb_name, sizeof(dmb_name), work->dmb_name.name); send_mailslot(True, BROWSE_MAILSLOT, outbuf,PTR_DIFF(p,outbuf), - global_myname(), 0x0, dmb_name, 0x0, + lp_netbios_name(), 0x0, dmb_name, 0x0, work->dmb_addr, FIRST_SUBNET->myip, DGRAM_PORT); } diff --git a/source3/nmbd/nmbd_elections.c b/source3/nmbd/nmbd_elections.c index 4340f660965..ac0d8735120 100644 --- a/source3/nmbd/nmbd_elections.c +++ b/source3/nmbd/nmbd_elections.c @@ -57,7 +57,7 @@ static void send_election_dgram(struct subnet_record *subrec, const char *workgr p = skip_string(outbuf,sizeof(outbuf),p); send_mailslot(False, BROWSE_MAILSLOT, outbuf, PTR_DIFF(p,outbuf), - global_myname(), 0, + lp_netbios_name(), 0, workgroup_name, 0x1e, subrec->bcast_ip, subrec->myip, DGRAM_PORT); } @@ -194,7 +194,7 @@ yet registered on subnet %s\n", nmb_namestr(&nmbname), subrec->subnet_name )); } send_election_dgram(subrec, work->work_group, work->ElectionCriterion, - t - StartupTime, global_myname()); + t - StartupTime, lp_netbios_name()); if (work->ElectionCount++ >= 4) { /* Won election (4 packets were sent out uncontested. */ @@ -231,7 +231,7 @@ static bool win_election(struct work_record *work, int version, version, ELECTION_VERSION, criterion, mycriterion, timeup, mytimeup, - server_name, global_myname())); + server_name, lp_netbios_name())); if (version > ELECTION_VERSION) return(False); @@ -248,7 +248,7 @@ static bool win_election(struct work_record *work, int version, if (timeup < mytimeup) return(True); - if (strcasecmp_m(global_myname(), server_name) > 0) + if (strcasecmp_m(lp_netbios_name(), server_name) > 0) return(False); return(True); diff --git a/source3/nmbd/nmbd_incomingdgrams.c b/source3/nmbd/nmbd_incomingdgrams.c index 11f3d43e0c5..582848c1fcf 100644 --- a/source3/nmbd/nmbd_incomingdgrams.c +++ b/source3/nmbd/nmbd_incomingdgrams.c @@ -144,7 +144,7 @@ void process_host_announce(struct subnet_record *subrec, struct packet_struct *p * to be our primary workgroup name. */ - if(strequal(work_name, global_myname())) + if(strequal(work_name, lp_netbios_name())) unstrcpy(work_name,lp_workgroup()); /* @@ -484,7 +484,7 @@ originate from OS/2 Warp client. Ignoring packet.\n")); * not needed in the LanMan announce code, but it won't hurt. */ - if(strequal(work_name, global_myname())) + if(strequal(work_name, lp_netbios_name())) unstrcpy(work_name,lp_workgroup()); /* @@ -571,7 +571,7 @@ static void send_backup_list_response(struct subnet_record *subrec, /* We always return at least one name - our own. */ count = 1; - unstrcpy(myname, global_myname()); + unstrcpy(myname, lp_netbios_name()); strupper_m(myname); myname[15]='\0'; push_ascii(p, myname, sizeof(outbuf)-PTR_DIFF(p,outbuf)-1, STR_TERMINATE); @@ -599,7 +599,7 @@ static void send_backup_list_response(struct subnet_record *subrec, if(count >= (unsigned int)max_number_requested) break; - if(strnequal(servrec->serv.name, global_myname(),15)) + if(strnequal(servrec->serv.name, lp_netbios_name(),15)) continue; if(!(servrec->serv.type & SV_TYPE_BACKUP_BROWSER)) @@ -625,7 +625,7 @@ static void send_backup_list_response(struct subnet_record *subrec, send_mailslot(True, BROWSE_MAILSLOT, outbuf,PTR_DIFF(p,outbuf), - global_myname(), 0, + lp_netbios_name(), 0, send_to_namestr,0, sendto_ip, subrec->myip, port); } diff --git a/source3/nmbd/nmbd_incomingrequests.c b/source3/nmbd/nmbd_incomingrequests.c index d0138ddd4a9..b2545f102fc 100644 --- a/source3/nmbd/nmbd_incomingrequests.c +++ b/source3/nmbd/nmbd_incomingrequests.c @@ -290,14 +290,14 @@ static int status_compare(char *n1,char *n2) ; for (l2=0;l2<15 && n2[l2] && n2[l2] != ' ';l2++) ; - l3 = strlen(global_myname()); + l3 = strlen(lp_netbios_name()); - if ((l1==l3) && strncmp(n1,global_myname(),l3) == 0 && - (l2!=l3 || strncmp(n2,global_myname(),l3) != 0)) + if ((l1==l3) && strncmp(n1,lp_netbios_name(),l3) == 0 && + (l2!=l3 || strncmp(n2,lp_netbios_name(),l3) != 0)) return -1; - if ((l2==l3) && strncmp(n2,global_myname(),l3) == 0 && - (l1!=l3 || strncmp(n1,global_myname(),l3) != 0)) + if ((l2==l3) && strncmp(n2,lp_netbios_name(),l3) == 0 && + (l1!=l3 || strncmp(n1,lp_netbios_name(),l3) != 0)) return 1; return memcmp(n1,n2,sizeof(name1)); diff --git a/source3/nmbd/nmbd_logonnames.c b/source3/nmbd/nmbd_logonnames.c index f99092055bb..9a05095bfd0 100644 --- a/source3/nmbd/nmbd_logonnames.c +++ b/source3/nmbd/nmbd_logonnames.c @@ -46,10 +46,10 @@ workgroup %s on subnet %s\n", failname, subrec->subnet_name)); return; } - if((servrec = find_server_in_workgroup( work, global_myname())) == NULL) { + if((servrec = find_server_in_workgroup( work, lp_netbios_name())) == NULL) { DEBUG(0,("become_logon_server_fail: Error - cannot find server %s \ in workgroup %s on subnet %s\n", - global_myname(), failname, subrec->subnet_name)); + lp_netbios_name(), failname, subrec->subnet_name)); work->log_state = LOGON_NONE; return; } @@ -87,10 +87,10 @@ workgroup %s on subnet %s\n", reg_name, subrec->subnet_name)); return; } - if((servrec = find_server_in_workgroup( work, global_myname())) == NULL) { + if((servrec = find_server_in_workgroup( work, lp_netbios_name())) == NULL) { DEBUG(0,("become_logon_server_success: Error - cannot find server %s \ in workgroup %s on subnet %s\n", - global_myname(), reg_name, subrec->subnet_name)); + lp_netbios_name(), reg_name, subrec->subnet_name)); work->log_state = LOGON_NONE; return; } diff --git a/source3/nmbd/nmbd_processlogon.c b/source3/nmbd/nmbd_processlogon.c index 89adf5a48d4..2adc81d76e1 100644 --- a/source3/nmbd/nmbd_processlogon.c +++ b/source3/nmbd/nmbd_processlogon.c @@ -291,7 +291,7 @@ static void nmbd_proxy_logon_done(struct tevent_req *subreq) send_mailslot(true, state->remote_mailslot, (char *)response.data, response.length, - global_myname(), 0x0, + lp_netbios_name(), 0x0, state->remote_name, state->remote_name_type, state->p->ip, @@ -338,7 +338,7 @@ logons are not enabled.\n", inet_ntoa(p->ip) )); pull_ascii_nstring(source_name, sizeof(source_name), dgram->source_name.name); - pdc_name = talloc_asprintf(talloc_tos(), "\\\\%s", global_myname()); + pdc_name = talloc_asprintf(talloc_tos(), "\\\\%s", lp_netbios_name()); if (!pdc_name) { return; } @@ -391,7 +391,7 @@ logons are not enabled.\n", inet_ntoa(p->ip) )); send_mailslot(True, request.req.logon0.mailslot_name, (char *)blob_out.data, blob_out.length, - global_myname(), 0x0, + lp_netbios_name(), 0x0, source_name, dgram->source_name.name_type, p->ip, ip, p->port); @@ -411,7 +411,7 @@ logons are not enabled.\n", inet_ntoa(p->ip) )); "reporting %s domain %s 0x%x ntversion=%x lm_nt token=%x lm_20 token=%x\n", request.req.pdc.computer_name, inet_ntoa(p->ip), - global_myname(), + lp_netbios_name(), lp_workgroup(), NETLOGON_RESPONSE_FROM_PDC, request.req.pdc.nt_version, @@ -419,9 +419,9 @@ logons are not enabled.\n", inet_ntoa(p->ip) )); request.req.pdc.lm20_token)); get_pdc.command = NETLOGON_RESPONSE_FROM_PDC; - get_pdc.pdc_name = global_myname(); + get_pdc.pdc_name = lp_netbios_name(); get_pdc._pad = data_blob_null; - get_pdc.unicode_pdc_name = global_myname(); + get_pdc.unicode_pdc_name = lp_netbios_name(); get_pdc.domain_name = lp_workgroup(); get_pdc.nt_version = NETLOGON_NT_VERSION_1; get_pdc.lmnt_token = 0xffff; @@ -443,7 +443,7 @@ logons are not enabled.\n", inet_ntoa(p->ip) )); send_mailslot(True, request.req.pdc.mailslot_name, (char *)blob_out.data, blob_out.length, - global_myname(), 0x0, + lp_netbios_name(), 0x0, source_name, dgram->source_name.name_type, p->ip, ip, p->port); @@ -553,7 +553,7 @@ logons are not enabled.\n", inet_ntoa(p->ip) )); nt5_ex.dns_domain = domain; nt5_ex.pdc_dns_name = hostname; nt5_ex.domain_name = lp_workgroup(); - nt5_ex.pdc_name = global_myname(); + nt5_ex.pdc_name = lp_netbios_name(); nt5_ex.user_name = request.req.logon.user_name; nt5_ex.server_site = "Default-First-Site-Name"; nt5_ex.client_site = "Default-First-Site-Name"; @@ -621,7 +621,7 @@ logons are not enabled.\n", inet_ntoa(p->ip) )); send_mailslot(true, request.req.logon.mailslot_name, (char *)blob_out.data, blob_out.length, - global_myname(), 0x0, + lp_netbios_name(), 0x0, source_name, dgram->source_name.name_type, p->ip, ip, p->port); diff --git a/source3/nmbd/nmbd_sendannounce.c b/source3/nmbd/nmbd_sendannounce.c index b389c02278d..847390b6154 100644 --- a/source3/nmbd/nmbd_sendannounce.c +++ b/source3/nmbd/nmbd_sendannounce.c @@ -50,7 +50,7 @@ void send_browser_reset(int reset_type, const char *to_name, int to_type, struct p++; send_mailslot(True, BROWSE_MAILSLOT, outbuf,PTR_DIFF(p,outbuf), - global_myname(), 0x0, to_name, to_type, to_ip, + lp_netbios_name(), 0x0, to_name, to_type, to_ip, FIRST_SUBNET->myip, DGRAM_PORT); } @@ -76,10 +76,10 @@ to subnet %s\n", work->work_group, subrec->subnet_name)); SCVAL(p,0,work->token); /* (local) Unique workgroup token id. */ p++; - p += push_string_check(p+1, global_myname(), 15, STR_ASCII|STR_UPPER|STR_TERMINATE); + p += push_string_check(p+1, lp_netbios_name(), 15, STR_ASCII|STR_UPPER|STR_TERMINATE); send_mailslot(False, BROWSE_MAILSLOT, outbuf,PTR_DIFF(p,outbuf), - global_myname(), 0x0, work->work_group,0x1e, subrec->bcast_ip, + lp_netbios_name(), 0x0, work->work_group,0x1e, subrec->bcast_ip, subrec->myip, DGRAM_PORT); } @@ -164,14 +164,14 @@ static void send_local_master_announcement(struct subnet_record *subrec, struct uint32 type = servrec->serv.type & ~SV_TYPE_LOCAL_LIST_ONLY; DEBUG(3,("send_local_master_announcement: type %x for name %s on subnet %s for workgroup %s\n", - type, global_myname(), subrec->subnet_name, work->work_group)); + type, lp_netbios_name(), subrec->subnet_name, work->work_group)); send_announcement(subrec, ANN_LocalMasterAnnouncement, - global_myname(), /* From nbt name. */ + lp_netbios_name(), /* From nbt name. */ work->work_group, 0x1e, /* To nbt name. */ subrec->bcast_ip, /* To ip. */ work->announce_interval, /* Time until next announce. */ - global_myname(), /* Name to announce. */ + lp_netbios_name(), /* Name to announce. */ type, /* Type field. */ servrec->serv.comment); } @@ -186,13 +186,13 @@ static void send_workgroup_announcement(struct subnet_record *subrec, struct wor subrec->subnet_name, work->work_group)); send_announcement(subrec, ANN_DomainAnnouncement, - global_myname(), /* From nbt name. */ + lp_netbios_name(), /* From nbt name. */ MSBROWSE, 0x1, /* To nbt name. */ subrec->bcast_ip, /* To ip. */ work->announce_interval, /* Time until next announce. */ work->work_group, /* Name to announce. */ SV_TYPE_DOMAIN_ENUM|SV_TYPE_NT, /* workgroup announce flags. */ - global_myname()); /* From name as comment. */ + lp_netbios_name()); /* From name as comment. */ } /**************************************************************************** @@ -251,7 +251,7 @@ static void announce_server(struct subnet_record *subrec, struct work_record *wo /* Only do domain announcements if we are a master and it's our primary name we're being asked to announce. */ - if (AM_LOCAL_MASTER_BROWSER(work) && strequal(global_myname(),servrec->serv.name)) { + if (AM_LOCAL_MASTER_BROWSER(work) && strequal(lp_netbios_name(),servrec->serv.name)) { send_local_master_announcement(subrec, work, servrec); send_workgroup_announcement(subrec, work); } else { @@ -566,7 +566,7 @@ for workgroup %s on subnet %s.\n", lp_workgroup(), FIRST_SUBNET->subnet_name )); SCVAL(p,0,ANN_MasterAnnouncement); p++; - unstrcpy(myname, global_myname()); + unstrcpy(myname, lp_netbios_name()); strupper_m(myname); myname[15]='\0'; push_ascii(p, myname, sizeof(outbuf)-PTR_DIFF(p,outbuf)-1, STR_TERMINATE); @@ -579,10 +579,10 @@ for workgroup %s on subnet %s.\n", lp_workgroup(), FIRST_SUBNET->subnet_name )); addr = interpret_addr2(s2); DEBUG(5,("announce_remote: Doing remote browse sync announce for server %s to IP %s.\n", - global_myname(), inet_ntoa(addr) )); + lp_netbios_name(), inet_ntoa(addr) )); send_mailslot(True, BROWSE_MAILSLOT, outbuf,PTR_DIFF(p,outbuf), - global_myname(), 0x0, "*", 0x0, addr, FIRST_SUBNET->myip, DGRAM_PORT); + lp_netbios_name(), 0x0, "*", 0x0, addr, FIRST_SUBNET->myip, DGRAM_PORT); } TALLOC_FREE(frame); } diff --git a/source3/nmbd/nmbd_workgroupdb.c b/source3/nmbd/nmbd_workgroupdb.c index 819d5048ad1..43a28aa6699 100644 --- a/source3/nmbd/nmbd_workgroupdb.c +++ b/source3/nmbd/nmbd_workgroupdb.c @@ -250,7 +250,7 @@ workgroup %s on subnet %s\n", work->work_group, subrec->subnet_name)); const char *name = my_netbios_names(i); int stype = lp_default_server_announce() | (lp_local_master() ? SV_TYPE_POTENTIAL_BROWSER : 0 ); - if(!strequal(global_myname(), name)) + if(!strequal(lp_netbios_name(), name)) stype &= ~(SV_TYPE_MASTER_BROWSER|SV_TYPE_POTENTIAL_BROWSER|SV_TYPE_DOMAIN_MASTER|SV_TYPE_DOMAIN_MEMBER); create_server_on_workgroup(work,name,stype|SV_TYPE_LOCAL_LIST_ONLY, PERMANENT_TTL, |