summaryrefslogtreecommitdiff
path: root/source3
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
commitc9567f2f221cd19f455cff207feec9efe2171632 (patch)
treeabb19eef1f882bc16a3673f37c45be2503884a2b /source3
parent61a38bd4b83b7f72b479e84daa5ea89164a92f85 (diff)
downloadsamba-c9567f2f221cd19f455cff207feec9efe2171632.tar.gz
samba-c9567f2f221cd19f455cff207feec9efe2171632.tar.bz2
samba-c9567f2f221cd19f455cff207feec9efe2171632.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 (This used to be commit 45d6d300767d5b99aff332bdfb0a8f464fd103e0)
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/namequery.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c
index 44932066b9..555d88fdc8 100644
--- a/source3/libsmb/namequery.c
+++ b/source3/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;
}