mirror of
https://github.com/samba-team/samba.git
synced 2025-03-03 12:58:35 +03:00
r19669: set_share_security does not need a mem_ctx passed
(This used to be commit 53eaa603eb84047263c27d57b8c0f5ce8e157189)
This commit is contained in:
parent
b6b84f98c0
commit
bef92ebb25
@ -145,7 +145,7 @@ SEC_DESC *get_share_security( TALLOC_CTX *ctx, const char *servicename,
|
||||
Store a security descriptor in the share db.
|
||||
********************************************************************/
|
||||
|
||||
BOOL set_share_security(TALLOC_CTX *ctx, const char *share_name, SEC_DESC *psd)
|
||||
BOOL set_share_security(const char *share_name, SEC_DESC *psd)
|
||||
{
|
||||
prs_struct ps;
|
||||
TALLOC_CTX *mem_ctx = NULL;
|
||||
|
@ -4608,7 +4608,7 @@ static int process_usershare_file(const char *dir_name, const char *file_name, i
|
||||
}
|
||||
|
||||
/* Write the ACL of the new/modified share. */
|
||||
if (!set_share_security(ctx, service_name, psd)) {
|
||||
if (!set_share_security(service_name, psd)) {
|
||||
DEBUG(0, ("process_usershare_file: Failed to set share "
|
||||
"security for user share %s\n",
|
||||
service_name ));
|
||||
|
@ -1542,7 +1542,7 @@ WERROR _srvsvc_NetShareSetInfo(pipes_struct *p, const char *server_unc, const ch
|
||||
&sd_size);
|
||||
|
||||
if (old_sd && !sec_desc_equal(old_sd, psd)) {
|
||||
if (!set_share_security(p->mem_ctx, share_name, psd))
|
||||
if (!set_share_security(share_name, psd))
|
||||
DEBUG(0,("_srv_net_share_set_info: Failed to change security info in share %s.\n",
|
||||
share_name ));
|
||||
}
|
||||
@ -1691,7 +1691,7 @@ WERROR _srvsvc_NetShareAdd(pipes_struct *p, const char *server_unc, uint32_t lev
|
||||
return WERR_ACCESS_DENIED;
|
||||
|
||||
if (psd) {
|
||||
if (!set_share_security(p->mem_ctx, share_name, psd)) {
|
||||
if (!set_share_security(share_name, psd)) {
|
||||
DEBUG(0,("_srv_net_share_add: Failed to add security info to share %s.\n", share_name ));
|
||||
}
|
||||
}
|
||||
|
@ -402,7 +402,7 @@ int main(int argc, const char *argv[])
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ( !set_share_security( ctx, lp_servicename(snum), secdesc ) ) {
|
||||
if ( !set_share_security( lp_servicename(snum), secdesc ) ) {
|
||||
fprintf( stderr, "Failed to store acl for share [%s]\n", sharename );
|
||||
return 2;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user