summaryrefslogtreecommitdiff
path: root/source3/nmbsync.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1996-06-05 15:16:09 +0000
committerAndrew Tridgell <tridge@samba.org>1996-06-05 15:16:09 +0000
commite38afbf38210b8cf30c5b13dc5ea96a6dda433f7 (patch)
tree06281d362a0c4d1cb96713613b2f541c0dea491e /source3/nmbsync.c
parent526cc39e432682afe57a1eb2607e1a3f261f4e8f (diff)
downloadsamba-e38afbf38210b8cf30c5b13dc5ea96a6dda433f7.tar.gz
samba-e38afbf38210b8cf30c5b13dc5ea96a6dda433f7.tar.bz2
samba-e38afbf38210b8cf30c5b13dc5ea96a6dda433f7.zip
- changed some debug levels in clientutil.c
- added dir_check_ftype() to clean up the file type checking a bit - added check for libc version >= 5 for setfsuid() for Linux - moved the AM_MASTER() and related macros to nameserv.h - added proper defines for the various netbios announce types - don't call the announce_backup() code, as I'm pretty sure its wrong it sent ANN_GetBackupListReq packets as broadcasts, they are supposed to be used only by clients to the master browser to find a list of available backup servers to remote a netserverenum to, I don't think nmbd should ever send one. - fixed a bug in the browse list writing - minor debug cleanups - put in the code to discard our own broadcasts (it won't work for multi-homed hosts though) - changed ELECTION_VERSION to 1 so we can be beaten by a NT 3.51 server by lowering the os level. - only do sync_browse_lists() if we are the master browser, otherwise we'll cause network overload - don't call tell_become_backup() as it appears to be badly broken, it should only be used when the machine being told has its MAINTAIN_LIST to to auto. Not calling it does no great harm anyway - fix a nasty bug where becomebackup was confused with reset browser! - make setbuffer() not get caught by the auto protototypes (This used to be commit cfbad9b08242962f41595273de08a7293fe432b1)
Diffstat (limited to 'source3/nmbsync.c')
-rw-r--r--source3/nmbsync.c72
1 files changed, 36 insertions, 36 deletions
diff --git a/source3/nmbsync.c b/source3/nmbsync.c
index c3e3f43e51..7e8cdd67e1 100644
--- a/source3/nmbsync.c
+++ b/source3/nmbsync.c
@@ -142,42 +142,42 @@ static BOOL add_info(struct domain_record *d, struct work_record *work, int serv
void sync_browse_lists(struct work_record *work, char *name, int nm_type,
struct in_addr ip)
{
- struct domain_record *d;
- pid = getpid();
- uid = getuid();
- gid = getgid();
- mid = pid + 100;
- name_type = nm_type;
-
- got_pass = True;
-
- DEBUG(4, ("sync browse lists with %s for %s %s\n",
- work->work_group, name, inet_ntoa(ip)));
-
- strcpy(workgroup,work->work_group);
- strcpy(desthost,name);
- dest_ip = ip;
-
- if (zero_ip(dest_ip)) return;
- have_ip = True;
-
- if (!(d = find_domain(ip))) return;
-
- connect_as_ipc = True;
-
- /* connect as server and get domains, then servers */
-
- sprintf(service,"\\\\%s\\IPC$", name);
- strupper(service);
-
- if (cli_open_sockets(SMB_PORT))
+ struct domain_record *d;
+ pid = getpid();
+ uid = getuid();
+ gid = getgid();
+ mid = pid + 100;
+ name_type = nm_type;
+
+ got_pass = True;
+
+ DEBUG(4,("sync browse lists with %s for %s %s\n",
+ work->work_group, name, inet_ntoa(ip)));
+
+ strcpy(workgroup,work->work_group);
+ strcpy(desthost,name);
+ dest_ip = ip;
+
+ if (zero_ip(dest_ip)) return;
+ have_ip = True;
+
+ if (!(d = find_domain(ip))) return;
+
+ connect_as_ipc = True;
+
+ /* connect as server and get domains, then servers */
+
+ sprintf(service,"\\\\%s\\IPC$", name);
+ strupper(service);
+
+ if (cli_open_sockets(SMB_PORT))
+ {
+ if (cli_send_login(NULL,NULL,True,True))
{
- 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);
- }
-
- close_sockets();
+ add_info(d, work, SV_TYPE_DOMAIN_ENUM);
+ add_info(d, work, SV_TYPE_ALL&~SV_TYPE_DOMAIN_ENUM);
}
+
+ close_sockets();
+ }
}