summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-12-07 14:41:09 -0800
committerJeremy Allison <jra@samba.org>2009-12-07 14:41:09 -0800
commita24631007ea4dcf25e777070d783608f988a5f94 (patch)
treed40471eb6d949edc55ee0ae6df376558d9ca9d92
parent12bac42a93cd6afd3cd29460b97bbd61852a9d44 (diff)
downloadsamba-a24631007ea4dcf25e777070d783608f988a5f94.tar.gz
samba-a24631007ea4dcf25e777070d783608f988a5f94.tar.bz2
samba-a24631007ea4dcf25e777070d783608f988a5f94.zip
parent_sd can never be null in this function, so don't
check for it. Jeremy.
-rw-r--r--source3/modules/vfs_acl_common.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c
index 735660d4bd..06bcfb856b 100644
--- a/source3/modules/vfs_acl_common.c
+++ b/source3/modules/vfs_acl_common.c
@@ -298,7 +298,7 @@ static NTSTATUS inherit_new_acl(vfs_handle_struct *handle,
struct security_descriptor *psd = NULL;
size_t size;
- if (!parent_desc || !sd_has_inheritable_components(parent_desc, is_directory)) {
+ if (!sd_has_inheritable_components(parent_desc, is_directory)) {
return NT_STATUS_OK;
}
@@ -721,6 +721,10 @@ static NTSTATUS create_file_acl_common(struct vfs_handle_struct *handle,
struct security_descriptor,
goto err);
+ if (!parent_sd) {
+ goto err;
+ }
+
/* New directory - inherit from parent. */
status1 = inherit_new_acl(handle, fsp, parent_sd, fsp->is_directory);