libcli/security: clean up and fix make_sec_desc
commit256aa9b20bbc5f0005677981ab545edf7d52edd6
authorDavid Disseldorp <ddiss@samba.org>
Wed, 28 May 2014 13:25:29 +0000 (28 15:25 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 28 May 2014 23:08:25 +0000 (29 01:08 +0200)
tree09dc85c494a3ff4157f656348bf2b6c35c270bd3
parent8605564f41f8f87dc4f2777294fb5abd9285e6e0
libcli/security: clean up and fix make_sec_desc

It currently leaks memory onto the provided talloc context on error, fix
this.

Use X_acl_dup() functions provided by secuity_descriptor.c, rather than
the redundant secdesc.c calls. Also, use the IDL generated functions to
calculate the security descriptor structure size.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
libcli/security/secdesc.c