summaryrefslogtreecommitdiffstats
path: root/source3/smbd/lanman.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/smbd/lanman.c
parent3878fa4c435140bd2e3c59f8bdb932fe19e4c13a (diff)
downloadsamba-f0dcc90f726e1232a4e0b74a03784281ea9a7cdc.tar.gz
samba-f0dcc90f726e1232a4e0b74a03784281ea9a7cdc.tar.xz
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/smbd/lanman.c')
-rw-r--r--source3/smbd/lanman.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c
index e5527a5812..fd8b0c7928 100644
--- a/source3/smbd/lanman.c
+++ b/source3/smbd/lanman.c
@@ -1994,7 +1994,8 @@ static bool api_RNetShareGetInfo(struct smbd_server_connection *sconn,
{
char *str1 = get_safe_str_ptr(param,tpscnt,param,2);
char *str2 = skip_string(param,tpscnt,str1);
- char *netname = skip_string(param,tpscnt,str2);
+ char *netname_in = skip_string(param,tpscnt,str2);
+ char *netname = NULL;
char *p = skip_string(param,tpscnt,netname);
int uLevel = get_safe_SVAL(param,tpscnt,p,0,-1);
int snum;
@@ -2003,8 +2004,8 @@ static bool api_RNetShareGetInfo(struct smbd_server_connection *sconn,
return False;
}
- snum = find_service(netname);
- if (snum < 0) {
+ snum = find_service(talloc_tos(), netname_in, &netname);
+ if (snum < 0 || !netname) {
return False;
}