summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorSamba Release Account <samba-bugs@samba.org>1997-04-09 01:19:25 +0000
committerSamba Release Account <samba-bugs@samba.org>1997-04-09 01:19:25 +0000
commit20b5dea237916902437ce3dcdb7c253fd1ad3585 (patch)
treee68a033a708efed2c93c95a73da978ebf9221c34 /source3/lib
parent02e610b927c9038cf498f726d807ee95a14714be (diff)
downloadsamba-20b5dea237916902437ce3dcdb7c253fd1ad3585.tar.gz
samba-20b5dea237916902437ce3dcdb7c253fd1ad3585.tar.bz2
samba-20b5dea237916902437ce3dcdb7c253fd1ad3585.zip
Large changes from jra@cygnus.com. Mainly browser updates.
access.c: Fixed crash if yp domain unavailable. includes.h: Moved ifdefs for minor platform. interface.c: Changed name of ipgrp to wins_ip to make it clearer. loadparm.c: Changed default of wins support to 'no'. nameannounce.c: Many changes to fix cross subnet browsing. namebrowse.c: Many changes to fix cross subnet browsing. namedbname.c: Many changes to fix cross subnet browsing. namedbresp.c: Many changes to fix cross subnet browsing. namedbsubnet.c: Many changes to fix cross subnet browsing. namedbwork.c: Many changes to fix cross subnet browsing. nameelect.c: Many changes to fix cross subnet browsing. namelogon.c: Many changes to fix cross subnet browsing. namepacket.c: Many changes to fix cross subnet browsing. nameresp.c: Many changes to fix cross subnet browsing. nameserv.c: Many changes to fix cross subnet browsing. nameserv.h: Many changes to fix cross subnet browsing. nameservreply.c: Many changes to fix cross subnet browsing. nameservresp.c: Many changes to fix cross subnet browsing. namework.c: Many changes to fix cross subnet browsing. nmbd.c: Change to search wins subnet. nmbsync.c: Change to check if we are any master before proceeding. proto.h: Added find_subnet_all() and check_work_servertype(). util.c: Moved 'done' settings on name resolution. (This used to be commit a82476eee2c521e5eed092bc367da0a7cef23de1)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/access.c4
-rw-r--r--source3/lib/interface.c4
-rw-r--r--source3/lib/util.c6
3 files changed, 8 insertions, 6 deletions
diff --git a/source3/lib/access.c b/source3/lib/access.c
index 31a48d09d3..599cb5ca7e 100644
--- a/source3/lib/access.c
+++ b/source3/lib/access.c
@@ -209,6 +209,10 @@ static int string_match(char *tok,char *s)
if (!mydomain) yp_get_default_domain(&mydomain);
+ if (!mydomain) {
+ DEBUG(0,("Unable to get default yp domain.\n"));
+ return NO;
+ }
if (!(hostname = strdup(s))) {
DEBUG(1,("out of memory for strdup!\n"));
return NO;
diff --git a/source3/lib/interface.c b/source3/lib/interface.c
index 1c41293cf7..0e2a13e7b9 100644
--- a/source3/lib/interface.c
+++ b/source3/lib/interface.c
@@ -24,7 +24,7 @@
extern int DEBUGLEVEL;
struct in_addr ipzero;
-struct in_addr ipgrp;
+struct in_addr wins_ip;
static struct in_addr default_ip;
static struct in_addr default_bcast;
static struct in_addr default_nmask;
@@ -261,7 +261,7 @@ static void interpret_interfaces(char *s, struct interface **interfaces,
struct in_addr ip;
ipzero = *interpret_addr2("0.0.0.0");
- ipgrp = *interpret_addr2("255.255.255.255");
+ wins_ip = *interpret_addr2("255.255.255.255");
while (next_token(&ptr,token,NULL)) {
/* parse it into an IP address/netmasklength pair */
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 643c2fb7a5..53b24173d5 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -3090,12 +3090,10 @@ char *client_name(void)
if (done)
return name_buf;
- done = True;
strcpy(name_buf,"UNKNOWN");
if (getpeername(Client, &sa, &length) < 0) {
DEBUG(0,("getpeername failed\n"));
- done = False;
return name_buf;
}
@@ -3105,7 +3103,6 @@ char *client_name(void)
AF_INET)) == 0) {
DEBUG(1,("Gethostbyaddr failed for %s\n",client_addr()));
StrnCpy(name_buf,client_addr(),sizeof(name_buf) - 1);
- done = False;
} else {
StrnCpy(name_buf,(char *)hp->h_name,sizeof(name_buf) - 1);
if (!matchname(name_buf, sockin->sin_addr)) {
@@ -3113,6 +3110,7 @@ char *client_name(void)
strcpy(name_buf,"UNKNOWN");
}
}
+ done = True;
return name_buf;
}
@@ -3129,7 +3127,6 @@ char *client_addr(void)
if (done)
return addr_buf;
- done = True;
strcpy(addr_buf,"0.0.0.0");
if (getpeername(Client, &sa, &length) < 0) {
@@ -3139,6 +3136,7 @@ char *client_addr(void)
strcpy(addr_buf,(char *)inet_ntoa(sockin->sin_addr));
+ done = True;
return addr_buf;
}