summaryrefslogtreecommitdiff
path: root/source4/rpc_server/common/share_info.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/rpc_server/common/share_info.c')
-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! */