network/uinet/sys/kern/uipc_sem.c
/*
 * Determine if the credentials have sufficient permissions for read
 * and write access.
 */
Determine if the credentials have sufficient permissions for read
and write access.
Determine if the credentials have sufficient permissions for read and write access .
static int
ksem_access(struct ksem *ks, struct ucred *ucred)
{
	int error;
	error = vaccess(VREG, ks->ks_mode, ks->ks_uid, ks->ks_gid,
	    VREAD | VWRITE, ucred, NULL);
	if (error)
		error = priv_check_cred(ucred, PRIV_SEM_WRITE, 0);
	return (error);
}
static int ksem_access ( struct ksem * ks , struct ucred * ucred ) { int error ; error = vaccess ( VREG , ks -> ks_mode , ks -> ks_uid , ks -> ks_gid , VREAD | VWRITE , ucred , NULL ) ; if ( error ) error = priv_check_cred ( ucred , PRIV_SEM_WRITE , 0 ) ; return ( error ) ; }
Determine if the credentials have sufficient permissions for read
 and write access.
Determine if the credentials have sufficient permissions for read and write access .