From f0dcc90f726e1232a4e0b74a03784281ea9a7cdc Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 9 Nov 2010 15:07:49 -0800 Subject: 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. --- source3/lib/dummysmbd.c | 2 +- source3/lib/util_str.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'source3/lib') diff --git a/source3/lib/dummysmbd.c b/source3/lib/dummysmbd.c index 2ab0ed559d..2465e6552b 100644 --- a/source3/lib/dummysmbd.c +++ b/source3/lib/dummysmbd.c @@ -23,7 +23,7 @@ #include "includes.h" -int find_service(fstring service) +int find_service(TALLOC_CTX *ctx, const char *service_in, char **p_service_out) { return -1; } 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