From d6cbe236e9cc4eb0719b6366e1f9cb63336d04c7 Mon Sep 17 00:00:00 2001 From: jpandre Date: Fri, 23 Nov 2007 10:48:47 +0000 Subject: [PATCH] Fixed "Dr Watson" situation again --- libntfs-3g/security.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libntfs-3g/security.c b/libntfs-3g/security.c index f0282ded..993d0770 100644 --- a/libntfs-3g/security.c +++ b/libntfs-3g/security.c @@ -668,11 +668,13 @@ static BOOL valid_securattr(const char *securattr, unsigned int attrsz) && valid_sid((const SID*)&securattr[le32_to_cpu(phead->owner)]) && valid_sid((const SID*)&securattr[le32_to_cpu(phead->group)]) /* - * we require SE_DACL_PRESENT to - * be consistent with offdacl. + * if there is an ACL, as indicated by offdacl, + * require SE_DACL_PRESENT + * but "Dr Watson" has SE_DACL_PRESENT though no DACL */ - && (pacl->revision == ACL_REVISION) - && (phead->control & SE_DACL_PRESENT ? offdacl : !offdacl)) { + && (!offdacl + || ((pacl->revision == ACL_REVISION) + && (phead->control & SE_DACL_PRESENT)))) { /* * For each ACE, check it is within limits