summaryrefslogtreecommitdiffstats
path: root/source/libsmb/namequery.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-11-19 18:57:53 +0000
committerGerald Carter <jerry@samba.org>2006-11-19 18:57:53 +0000
commitd3e8b0e2588d81d0adc6a30ca7f659fec9dc16c9 (patch)
tree1e3d74c975207162e1e705c38a938dea16f915d8 /source/libsmb/namequery.c
parentfa9727d443956c4ef4dcf3dbb83f311813f122ea (diff)
downloadsamba-d3e8b0e2588d81d0adc6a30ca7f659fec9dc16c9.tar.gz
samba-d3e8b0e2588d81d0adc6a30ca7f659fec9dc16c9.tar.xz
samba-d3e8b0e2588d81d0adc6a30ca7f659fec9dc16c9.zip
r19798: reducing some diffs...bringing over ntlm_auth changes
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 5102233fbd0..c232ad4938b 100644
--- a/source/libsmb/namequery.c
+++ b/source/libsmb/namequery.c
@@ -57,6 +57,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;
@@ -110,7 +115,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;
}