sys/kern/kern_acl.c
/*
 * Given a requested mode for a new object, and a default ACL, combine
 * the two to produce a new mode.  Be careful not to clear any bits that
 * aren't intended to be affected by the POSIX.1e ACL.  Eventually,
 * this might also take the cmask as an argument, if we push that down
 * into per-filesystem-code.
 */
Given a requested mode for a new object, and a default ACL, combine
the two to produce a new mode.  Be careful not to clear any bits that
aren't intended to be affected by the POSIX.1e ACL.  Eventually,
this might also take the cmask as an argument, if we push that down
into per-filesystem-code.
Given a requested mode for a new object and a default ACL combine the two to produce a new mode . Be careful not to clear any bits that aren ' t intended to be affected by the POSIX . 1e ACL . Eventually this might also take the cmask as an argument if we push that down into per - filesystem - code .
mode_t
acl_posix1e_newfilemode(mode_t cmode, struct acl *dacl)
{
	mode_t mode;
	mode = cmode;
	mode &= ACL_PRESERVE_MASK;
	mode |= (ACL_OVERRIDE_MASK & cmode & acl_posix1e_acl_to_mode(dacl));
	return (mode);
}
mode_t acl_posix1e_newfilemode ( mode_t cmode , struct acl * dacl ) { mode_t mode ; mode = cmode ; mode &= ACL_PRESERVE_MASK ; mode |= ( ACL_OVERRIDE_MASK & cmode & acl_posix1e_acl_to_mode ( dacl ) ) ; return ( mode ) ; }
Given a requested mode for a new object, and a default ACL, combine
 the two to produce a new mode.
Given a requested mode for a new object and a default ACL combine the two to produce a new mode .
/*
	 * The current composition policy is that a permission bit must
	 * be set in *both* the ACL and the requested creation mode for
	 * it to appear in the resulting mode/ACL.  First clear any
	 * possibly effected bits, then reconstruct.
	 */