summaryrefslogtreecommitdiff
path: root/source3/nameelect.c
diff options
context:
space:
mode:
authorSamba Release Account <samba-bugs@samba.org>1996-08-01 17:49:40 +0000
committerSamba Release Account <samba-bugs@samba.org>1996-08-01 17:49:40 +0000
commit3ffb30e8be5bcddca9d0489e1993085a4995c3af (patch)
treea36a093e5ede9021bc01ca5d50cae3d82ac3bbea /source3/nameelect.c
parent9bf446124b5ad991e071f92eeabcbb838eb9f50b (diff)
downloadsamba-3ffb30e8be5bcddca9d0489e1993085a4995c3af.tar.gz
samba-3ffb30e8be5bcddca9d0489e1993085a4995c3af.tar.bz2
samba-3ffb30e8be5bcddca9d0489e1993085a4995c3af.zip
local_only NetServerEnum syncs can now be issued.
bug spotted in nameservresp.c - arguments to test subnet the response is received on (same_net()) were the wrong way round (ccm@shentel.net) samba was adding WORKGROUP(1e) as a unique not a group name: fixed this bug in reply_name_status() and reply_name_query(): WINS entries weren't being looked up. name status reply adds local SELF entries to WINS SELF entries: some SELF entries are only added locally, while others are only added via WINS. name status needs to have both, combined. a sync will only occur when an ANN_LocalMasterAnnouncement is received, NOT an ANN_HostAnnouncement or an ANN_DomainAnnouncement. when samba is a member of a workgroup, it looks for (using a wins server) and announces to its domain master. NAME_QUERY_ANNOUNCE_HOST - yet another 'state' - has been created to do this: do the name query on the wins server and send the announce host to the answer to this query. jeremy @ vantive wrote the original code to do this, which used the name_query() function. i'm trying to avoid name_query: it times out and generally messes things up, but using queue_netbios_packet() and queue_netbios_pkt_wins() is... not intuitive? lkcl with help from jra (This used to be commit 6e932e4bae8b46e7ff4a55a75484bad78308336a)
Diffstat (limited to 'source3/nameelect.c')
-rw-r--r--source3/nameelect.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source3/nameelect.c b/source3/nameelect.c
index 1095f8a7fa..8c93de03a8 100644
--- a/source3/nameelect.c
+++ b/source3/nameelect.c
@@ -52,6 +52,7 @@ extern time_t StartupTime;
extern struct subnet_record *subnetlist;
+extern uint16 nb_type; /* samba's NetBIOS name type */
/*******************************************************************
occasionally check to see if the master browser is around
@@ -81,7 +82,7 @@ void check_master_browser(void)
if (!AM_MASTER(work))
{
queue_netbios_packet(d,ClientNMB,NMB_QUERY,NAME_QUERY_MST_CHK,
- work->work_group,0x1d,0,0,
+ work->work_group,0x1d,0,0,0,NULL,NULL,
True,False,d->bcast_ip,d->bcast_ip);
}
}
@@ -268,7 +269,7 @@ void become_master(struct subnet_record *d, struct work_record *work)
add_server_entry(d,work,myname,work->ServerType,0,ServerComment,True);
/* add special browser name */
- add_my_name_entry(d,MSBROWSE ,0x01,NB_ACTIVE|NB_GROUP);
+ add_my_name_entry(d,MSBROWSE ,0x01,nb_type|NB_ACTIVE|NB_GROUP);
/* DON'T do anything else after calling add_my_name_entry() */
return;
@@ -282,7 +283,7 @@ void become_master(struct subnet_record *d, struct work_record *work)
add_server_entry(d,work,work->work_group,domain_type,0,myname,True);
/* add master name */
- add_my_name_entry(d,work->work_group,0x1d,NB_ACTIVE );
+ add_my_name_entry(d,work->work_group,0x1d,nb_type|NB_ACTIVE);
/* DON'T do anything else after calling add_my_name_entry() */
return;
@@ -320,7 +321,7 @@ void become_master(struct subnet_record *d, struct work_record *work)
DEBUG(3,("domain first stage: register as domain member\n"));
/* add domain member name */
- add_my_name_entry(d,work->work_group,0x1e,NB_ACTIVE );
+ add_my_name_entry(d,work->work_group,0x1e,nb_type|NB_ACTIVE|NB_GROUP);
/* DON'T do anything else after calling add_my_name_entry() */
return;
@@ -347,7 +348,7 @@ void become_master(struct subnet_record *d, struct work_record *work)
}
/* add domain master name */
- add_my_name_entry(d,work->work_group,0x1b,NB_ACTIVE );
+ add_my_name_entry(d,work->work_group,0x1b,nb_type|NB_ACTIVE );
/* DON'T do anything else after calling add_my_name_entry() */
return;