[PATCH 08/13] s3/posix_acls: replace dup_sec_desc() usage

David Disseldorp ddiss at samba.org
Mon May 26 09:29:58 MDT 2014


Use security_descriptor_copy() instead, which is also provided by
libcli.

Signed-off-by: David Disseldorp <ddiss at samba.org>
---
 source3/smbd/posix_acls.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index 621457e..9584451 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -3670,12 +3670,12 @@ NTSTATUS set_nt_acl(files_struct *fsp, uint32 security_info_sent, const struct s
 		return NT_STATUS_MEDIA_WRITE_PROTECTED;
 	}
 
-	if (!psd_orig) {
+	if (psd_orig == NULL) {
 		return NT_STATUS_INVALID_PARAMETER;
 	}
 
-	psd = dup_sec_desc(talloc_tos(), psd_orig);
-	if (!psd) {
+	psd = security_descriptor_copy(talloc_tos(), psd_orig);
+	if (psd == NULL) {
 		return NT_STATUS_NO_MEMORY;
 	}
 
-- 
1.8.4.5



More information about the samba-technical mailing list