diff options
author | Samba Release Account <samba-bugs@samba.org> | 1996-08-01 17:49:40 +0000 |
---|---|---|
committer | Samba Release Account <samba-bugs@samba.org> | 1996-08-01 17:49:40 +0000 |
commit | 3ffb30e8be5bcddca9d0489e1993085a4995c3af (patch) | |
tree | a36a093e5ede9021bc01ca5d50cae3d82ac3bbea /source3/nmbsync.c | |
parent | 9bf446124b5ad991e071f92eeabcbb838eb9f50b (diff) | |
download | samba-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/nmbsync.c')
-rw-r--r-- | source3/nmbsync.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source3/nmbsync.c b/source3/nmbsync.c index de3d9e8733..2efb364bca 100644 --- a/source3/nmbsync.c +++ b/source3/nmbsync.c @@ -136,8 +136,10 @@ static BOOL add_info(struct subnet_record *d, struct work_record *work, int serv do a NetServerEnum and update our server and workgroup databases. ******************************************************************/ void sync_browse_lists(struct subnet_record *d, struct work_record *work, - char *name, int nm_type, struct in_addr ip) + char *name, int nm_type, struct in_addr ip, BOOL local) { + uint32 local_type = local ? SV_TYPE_LOCAL_LIST_ONLY : 0; + if (!d || !work || !AM_MASTER(work)) return; pid = getpid(); @@ -169,8 +171,9 @@ void sync_browse_lists(struct subnet_record *d, struct work_record *work, { if (cli_send_login(NULL,NULL,True,True)) { - add_info(d, work, SV_TYPE_DOMAIN_ENUM); - add_info(d, work, SV_TYPE_ALL&~SV_TYPE_DOMAIN_ENUM); + add_info(d, work, local_type|SV_TYPE_DOMAIN_ENUM); + add_info(d, work, local_type|(SV_TYPE_ALL& + ~(SV_TYPE_DOMAIN_ENUM|SV_TYPE_LOCAL_LIST_ONLY))); } close_sockets(); |