Fixed "Dr Watson" situation again

N2009_11_14_FIXES
jpandre 2007-11-23 10:48:47 +00:00
parent 95038a1cb0
commit d6cbe236e9
1 changed files with 6 additions and 4 deletions

View File

@ -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