From 762928945d8c18abbce1447fb0e731a4515ffb4c Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 28 Mar 2012 15:09:47 -0700 Subject: [PATCH] Based on code from Richard Sharpe , ensure we don't crash on a NULL DACL. --- source3/smbd/file_access.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source3/smbd/file_access.c b/source3/smbd/file_access.c index 9fff8e3051f..6ced6a62558 100644 --- a/source3/smbd/file_access.c +++ b/source3/smbd/file_access.c @@ -155,7 +155,10 @@ bool directory_has_default_acl(connection_struct *conn, const char *fname) NTSTATUS status = SMB_VFS_GET_NT_ACL(conn, fname, SECINFO_DACL, &secdesc); - if (!NT_STATUS_IS_OK(status) || secdesc == NULL) { + if (!NT_STATUS_IS_OK(status) || + secdesc == NULL || + secdesc->dacl == NULL) { + TALLOC_FREE(secdesc); return false; } -- 2.34.1