diff options
| author | Garming Sam <garming@catalyst.net.nz> | 2014-01-17 10:16:12 +1300 |
|---|---|---|
| committer | Andrew Bartlett <abartlet@samba.org> | 2014-02-20 10:11:00 +1300 |
| commit | bce62e600085270f26053882c5a4e35f5fe4fb5e (patch) | |
| tree | 36be15d3c9867498693ae247c119c18b933e835f /source4/smb_server/smb | |
| parent | 497f0327a08fbfa444308c90a418ccb6b45b96d6 (diff) | |
| download | samba-bce62e600085270f26053882c5a4e35f5fe4fb5e.tar.gz samba-bce62e600085270f26053882c5a4e35f5fe4fb5e.tar.xz samba-bce62e600085270f26053882c5a4e35f5fe4fb5e.zip | |
s4: pass down a memory context when performing share_string_option, to allow substitutions
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Change-Id: I24b36db3ac11834c3268b2da929e214c10268b16
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
Diffstat (limited to 'source4/smb_server/smb')
| -rw-r--r-- | source4/smb_server/smb/service.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/smb_server/smb/service.c b/source4/smb_server/smb/service.c index 9ad0f3894e..e25be1c382 100644 --- a/source4/smb_server/smb/service.c +++ b/source4/smb_server/smb/service.c @@ -111,7 +111,7 @@ static NTSTATUS make_connection(struct smbsrv_request *req, enum ntvfs_type type; const char *type_str; struct share_config *scfg; - const char *sharetype; + char *sharetype; /* the service might be of the form \\SERVER\SHARE. Should we put the server name we get from this somewhere? */ @@ -138,7 +138,7 @@ static NTSTATUS make_connection(struct smbsrv_request *req, } /* work out what sort of connection this is */ - sharetype = share_string_option(scfg, "type", "DISK"); + sharetype = share_string_option(req, scfg, "type", "DISK"); if (sharetype && strcmp(sharetype, "IPC") == 0) { type = NTVFS_IPC; type_str = "IPC"; @@ -149,6 +149,7 @@ static NTSTATUS make_connection(struct smbsrv_request *req, type = NTVFS_DISK; type_str = "A:"; } + TALLOC_FREE(sharetype); if (strcmp(dev, "?????") != 0 && strcasecmp(type_str, dev) != 0) { /* the client gave us the wrong device type */ |
