diff options
author | Jeremy Allison <jra@samba.org> | 2010-11-09 15:07:49 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2010-11-10 01:14:17 +0000 |
commit | f0dcc90f726e1232a4e0b74a03784281ea9a7cdc (patch) | |
tree | f05f122e49e766b6267feb65dc1dc738d4fbd70f /source3/param | |
parent | 3878fa4c435140bd2e3c59f8bdb932fe19e4c13a (diff) | |
download | samba-f0dcc90f726e1232a4e0b74a03784281ea9a7cdc.tar.gz |
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/param')
-rw-r--r-- | source3/param/loadparm.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index f65682fbedf..31402cc0a24 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -9620,17 +9620,11 @@ struct share_params *get_share_params(TALLOC_CTX *mem_ctx, const char *sharename) { struct share_params *result; - char *sname; + char *sname = NULL; int snum; - if (!(sname = SMB_STRDUP(sharename))) { - return NULL; - } - - snum = find_service(sname); - SAFE_FREE(sname); - - if (snum < 0) { + snum = find_service(mem_ctx, sharename, &sname); + if (snum < 0 || sname == NULL) { return NULL; } |