summaryrefslogtreecommitdiff
path: root/source3/lib/util_str.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-11-09 15:07:49 -0800
committerJeremy Allison <jra@samba.org>2010-11-10 01:14:17 +0000
commitf0dcc90f726e1232a4e0b74a03784281ea9a7cdc (patch)
treef05f122e49e766b6267feb65dc1dc738d4fbd70f /source3/lib/util_str.c
parent3878fa4c435140bd2e3c59f8bdb932fe19e4c13a (diff)
downloadsamba-f0dcc90f726e1232a4e0b74a03784281ea9a7cdc.tar.gz
samba-f0dcc90f726e1232a4e0b74a03784281ea9a7cdc.tar.bz2
samba-f0dcc90f726e1232a4e0b74a03784281ea9a7cdc.zip
Fix bug 7781 - Samba transforms ShareName to lowercase (sharename) when adding new share via MMC
Change the find_service() interface to not depend on fstring, and create a useable talloc-based interface. Jeremy.
Diffstat (limited to 'source3/lib/util_str.c')
-rw-r--r--source3/lib/util_str.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c
index 508050d892..61b46edc5d 100644
--- a/source3/lib/util_str.c
+++ b/source3/lib/util_str.c
@@ -2307,6 +2307,10 @@ bool validate_net_name( const char *name,
{
int i;
+ if (!name) {
+ return false;
+ }
+
for ( i=0; i<max_len && name[i]; i++ ) {
/* fail if strchr_m() finds one of the invalid characters */
if ( name[i] && strchr_m( invalid_chars, name[i] ) ) {