diff options
author | David Disseldorp <ddiss@samba.org> | 2014-05-26 15:46:00 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2014-05-28 17:52:13 +0200 |
commit | 40bca3bdd56b58aa5e6117f08dfd3ceb9d113316 (patch) | |
tree | 7734fc17c108b60b57af32ff09cfe02dd23787d6 /source3/utils | |
parent | aef195d0b3a4111206e9b13b27c135367976974a (diff) | |
download | samba-40bca3bdd56b58aa5e6117f08dfd3ceb9d113316.tar.gz samba-40bca3bdd56b58aa5e6117f08dfd3ceb9d113316.tar.xz samba-40bca3bdd56b58aa5e6117f08dfd3ceb9d113316.zip |
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>
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_rpc_printer.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/source3/utils/net_rpc_printer.c b/source3/utils/net_rpc_printer.c index 3cdac6223f..f5247b2935 100644 --- a/source3/utils/net_rpc_printer.c +++ b/source3/utils/net_rpc_printer.c @@ -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); |