SMB4ACL_T's don't support file masks, so when a richacl is exposed as a SMB4ACL_T, the file masks need to be applied first. Convert the (Automatic Inheritance-related) ACL flags. Make sure the RICHACE_SPECIAL_WHO flag will not be set by accident. Recognize additional errno values that can occur when richacls are not supported. Call add_implicitly_granted_permissions() when converting a richacl into a SMB4ACL_T, not when converting a SMB4ACL_T into a richacl.