When encoding a POSIX ACL to the EXT4 ACL format, if an unknown tag
is encountered, that entry is silently ignored. It would be better
to return an error to inform the user that the ACL is incompatible.
Also fix the mismatched indentation in the opposite function.
Signed-off-by: Samuel Holland <samuel@sholland.org>
e += sizeof(ext4_acl_entry);
s += sizeof(ext4_acl_entry);
break;
+ default:
+ return EINVAL;
}
}
*size_out = s;
cp += sizeof(ext4_acl_entry);
size -= sizeof(ext4_acl_entry);
break;
- default:
- ext2fs_free_mem(&out);
- return EINVAL;
+ default:
+ ext2fs_free_mem(&out);
+ return EINVAL;
}
entry++;
}