summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2006-09-15 12:45:08 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:18:45 -0500
commitab188e02af3d0b1b91ae55a2c15433fc817a4f7b (patch)
treef96a050775d75ebd7e7ac8ad0f5090f10a6a7ab2 /source4
parenta8fd66f91fcb16dd56890f918e47443f2aba3a98 (diff)
downloadsamba-ab188e02af3d0b1b91ae55a2c15433fc817a4f7b.tar.gz
samba-ab188e02af3d0b1b91ae55a2c15433fc817a4f7b.tar.bz2
samba-ab188e02af3d0b1b91ae55a2c15433fc817a4f7b.zip
r18550: Return a path not just a disk drive
(This used to be commit 60076fa87d6c68295ebedc28cdbbd4556cfd0ae7)
Diffstat (limited to 'source4')
-rw-r--r--source4/rpc_server/common/share_info.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source4/rpc_server/common/share_info.c b/source4/rpc_server/common/share_info.c
index 727e89e84a..f14af04e66 100644
--- a/source4/rpc_server/common/share_info.c
+++ b/source4/rpc_server/common/share_info.c
@@ -79,13 +79,21 @@ enum srvsvc_ShareType dcesrv_common_get_share_type(TALLOC_CTX *mem_ctx, struct d
const char *dcesrv_common_get_share_path(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx, struct share_config *scfg)
{
const char *sharetype;
+ char *p;
sharetype = share_string_option(scfg, SHARE_TYPE, SHARE_TYPE_DEFAULT);
if (sharetype && strcasecmp(sharetype, "IPC") == 0) {
return talloc_strdup(mem_ctx, "");
}
- return talloc_strdup(mem_ctx, "C:\\");
+
+ p = talloc_strdup(mem_ctx, share_string_option(scfg, SHARE_PATH, ""));
+ if (!p) {
+ return NULL;
+ }
+ all_string_sub(p, "/", "\\", 0);
+
+ return talloc_asprintf(mem_ctx, "C:%s", p);
}
/* This hardcoded value should go into a ldb database! */