mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
s3/profiles: replace dup_sec_desc() usage
Use security_descriptor_copy() instead, which is also provided by libcli. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
21b03f4e62
commit
aef195d0b3
@ -129,8 +129,14 @@ static bool copy_registry_tree( REGF_FILE *infile, REGF_NK_REC *nk,
|
||||
|
||||
/* swap out the SIDs in the security descriptor */
|
||||
|
||||
if ( !(new_sd = dup_sec_desc( outfile->mem_ctx, nk->sec_desc->sec_desc )) ) {
|
||||
fprintf( stderr, "Failed to copy security descriptor!\n" );
|
||||
if (nk->sec_desc->sec_desc == NULL) {
|
||||
new_sd = NULL;
|
||||
} else {
|
||||
new_sd = security_descriptor_copy(outfile->mem_ctx,
|
||||
nk->sec_desc->sec_desc);
|
||||
}
|
||||
if (new_sd == NULL) {
|
||||
fprintf(stderr, "Failed to copy security descriptor!\n");
|
||||
return False;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user