mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
s3/net_rpc_printer: 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> Reviewed-by: Volker Lendecke <vl@samba.org>
This commit is contained in:
parent
aef195d0b3
commit
40bca3bdd5
@ -1643,7 +1643,17 @@ NTSTATUS rpc_printer_migrate_security_internals(struct net_context *c,
|
||||
|
||||
/* copy secdesc (info level 2) */
|
||||
info_dst.info2.devmode = NULL;
|
||||
info_dst.info2.secdesc = dup_sec_desc(mem_ctx, info_src.info3.secdesc);
|
||||
if (info_src.info3.secdesc == NULL) {
|
||||
info_dst.info2.secdesc = NULL;
|
||||
} else {
|
||||
info_dst.info2.secdesc
|
||||
= security_descriptor_copy(mem_ctx,
|
||||
info_src.info3.secdesc);
|
||||
if (info_dst.info2.secdesc == NULL) {
|
||||
nt_status = NT_STATUS_NO_MEMORY;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
if (c->opt_verbose)
|
||||
display_sec_desc(info_dst.info2.secdesc);
|
||||
|
Loading…
Reference in New Issue
Block a user