From 60076fa87d6c68295ebedc28cdbbd4556cfd0ae7 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Fri, 15 Sep 2006 12:45:08 +0000 Subject: [PATCH] r18550: Return a path not just a disk drive --- source/rpc_server/common/share_info.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/source/rpc_server/common/share_info.c b/source/rpc_server/common/share_info.c index 727e89e84aa..f14af04e66f 100644 --- a/source/rpc_server/common/share_info.c +++ b/source/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! */ -- 2.11.4.GIT