mirror of
https://github.com/samba-team/samba.git
synced 2025-08-02 00:22:11 +03:00
smbdotconf: mark "add share command" with substitution="1"
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
committed by
Stefan Metzmacher
parent
39f8014275
commit
390f53cb03
@ -1,6 +1,7 @@
|
|||||||
<samba:parameter name="add share command"
|
<samba:parameter name="add share command"
|
||||||
context="G"
|
context="G"
|
||||||
type="string"
|
type="string"
|
||||||
|
substitution="1"
|
||||||
xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
|
xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
|
||||||
<description>
|
<description>
|
||||||
<para>
|
<para>
|
||||||
|
@ -1992,6 +1992,8 @@ WERROR _srvsvc_NetShareAdd(struct pipes_struct *p,
|
|||||||
int max_connections = 0;
|
int max_connections = 0;
|
||||||
SMB_STRUCT_STAT st;
|
SMB_STRUCT_STAT st;
|
||||||
TALLOC_CTX *ctx = p->mem_ctx;
|
TALLOC_CTX *ctx = p->mem_ctx;
|
||||||
|
const struct loadparm_substitution *lp_sub =
|
||||||
|
loadparm_s3_global_substitution();
|
||||||
|
|
||||||
DEBUG(5,("_srvsvc_NetShareAdd: %d\n", __LINE__));
|
DEBUG(5,("_srvsvc_NetShareAdd: %d\n", __LINE__));
|
||||||
|
|
||||||
@ -2004,7 +2006,7 @@ WERROR _srvsvc_NetShareAdd(struct pipes_struct *p,
|
|||||||
if (p->session_info->unix_token->uid != sec_initial_uid() && !is_disk_op )
|
if (p->session_info->unix_token->uid != sec_initial_uid() && !is_disk_op )
|
||||||
return WERR_ACCESS_DENIED;
|
return WERR_ACCESS_DENIED;
|
||||||
|
|
||||||
if (!lp_add_share_command(talloc_tos()) || !*lp_add_share_command(talloc_tos())) {
|
if (!lp_add_share_command(talloc_tos(), lp_sub) || !*lp_add_share_command(talloc_tos(), lp_sub)) {
|
||||||
DBG_WARNING("_srvsvc_NetShareAdd: No \"add share command\" parameter set in smb.conf.\n");
|
DBG_WARNING("_srvsvc_NetShareAdd: No \"add share command\" parameter set in smb.conf.\n");
|
||||||
return WERR_ACCESS_DENIED;
|
return WERR_ACCESS_DENIED;
|
||||||
}
|
}
|
||||||
@ -2110,7 +2112,7 @@ WERROR _srvsvc_NetShareAdd(struct pipes_struct *p,
|
|||||||
|
|
||||||
command = talloc_asprintf(ctx,
|
command = talloc_asprintf(ctx,
|
||||||
"%s \"%s\" \"%s\" \"%s\" \"%s\" %d",
|
"%s \"%s\" \"%s\" \"%s\" \"%s\" %d",
|
||||||
lp_add_share_command(talloc_tos()),
|
lp_add_share_command(talloc_tos(), lp_sub),
|
||||||
get_dyn_CONFIGFILE(),
|
get_dyn_CONFIGFILE(),
|
||||||
share_name_in,
|
share_name_in,
|
||||||
path,
|
path,
|
||||||
|
Reference in New Issue
Block a user