Checked Posix ACL versions

PERMISSION_HANDLING_BRANCH
Jean-Pierre André 2010-10-01 10:41:32 +02:00
parent 07e686a744
commit e40c942f3a
1 changed files with 3 additions and 1 deletions

View File

@ -2995,7 +2995,9 @@ int ntfs_set_posix_acl(struct SECURITY_CONTEXT *scx, ntfs_inode *ni,
count = 0;
isdir = (ni->mrec->flags & MFT_RECORD_IS_DIRECTORY) != const_cpu_to_le16(0);
newpxdesc = (struct POSIX_SECURITY*)NULL;
if (!deflt || isdir || !size) {
if ((!value
|| (((const struct POSIX_ACL*)value)->version == POSIX_VERSION))
&& (!deflt || isdir || (!size && !value))) {
cached = fetch_cache(scx, ni);
if (cached) {
uid = cached->uid;