mirror of
https://github.com/samba-team/samba.git
synced 2025-12-03 04:23:50 +03:00
r18550: Return a path not just a disk drive
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
888a769af5
commit
60076fa87d
@@ -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 *dcesrv_common_get_share_path(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx, struct share_config *scfg)
|
||||||
{
|
{
|
||||||
const char *sharetype;
|
const char *sharetype;
|
||||||
|
char *p;
|
||||||
|
|
||||||
sharetype = share_string_option(scfg, SHARE_TYPE, SHARE_TYPE_DEFAULT);
|
sharetype = share_string_option(scfg, SHARE_TYPE, SHARE_TYPE_DEFAULT);
|
||||||
|
|
||||||
if (sharetype && strcasecmp(sharetype, "IPC") == 0) {
|
if (sharetype && strcasecmp(sharetype, "IPC") == 0) {
|
||||||
return talloc_strdup(mem_ctx, "");
|
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! */
|
/* This hardcoded value should go into a ldb database! */
|
||||||
|
|||||||
Reference in New Issue
Block a user