summaryrefslogtreecommitdiffstats
path: root/source/libsmb/namequery.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2006-11-10 13:46:19 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:15:44 -0500
commit45d6d300767d5b99aff332bdfb0a8f464fd103e0 (patch)
treeea352d9eee7716cdba5f5f73a45ec3069b2cf038 /source/libsmb/namequery.c
parentff004f7284cb047e738ba3d3ad6602e8aa84e883 (diff)
downloadsamba-45d6d300767d5b99aff332bdfb0a8f464fd103e0.tar.gz
samba-45d6d300767d5b99aff332bdfb0a8f464fd103e0.tar.xz
samba-45d6d300767d5b99aff332bdfb0a8f464fd103e0.zip
r19652: Trying to track down which caller tries to store a 0 length domain name
in the affinity cache (which happens all the time here). Guenther
Diffstat (limited to 'source/libsmb/namequery.c')
-rw-r--r--source/libsmb/namequery.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/libsmb/namequery.c b/source/libsmb/namequery.c
index 44932066b9a..555d88fdc83 100644
--- a/source/libsmb/namequery.c
+++ b/source/libsmb/namequery.c
@@ -59,6 +59,11 @@ BOOL saf_store( const char *domain, const char *servername )
DEBUG(2,("saf_store: Refusing to store empty domain or servername!\n"));
return False;
}
+
+ if ( (strlen(domain) == 0) || (strlen(servername) == 0) ) {
+ DEBUG(0,("saf_store: refusing to store 0 length domain or servername!\n"));
+ return False;
+ }
if ( !gencache_init() )
return False;
@@ -111,7 +116,7 @@ char *saf_fetch( const char *domain )
BOOL ret = False;
char *key = NULL;
- if ( !domain ) {
+ if ( !domain || strlen(domain) == 0) {
DEBUG(2,("saf_fetch: Empty domain name!\n"));
return NULL;
}