summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
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;
}