MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ksem_access

Function ksem_access

freebsd/kern/uipc_sem.c:359–369  ·  view source on GitHub ↗

* Determine if the credentials have sufficient permissions for read * and write access. */

Source from the content-addressed store, hash-verified

357 * and write access.
358 */
359static int
360ksem_access(struct ksem *ks, struct ucred *ucred)
361{
362 int error;
363
364 error = vaccess(VREG, ks->ks_mode, ks->ks_uid, ks->ks_gid,
365 VREAD | VWRITE, ucred);
366 if (error)
367 error = priv_check_cred(ucred, PRIV_SEM_WRITE);
368 return (error);
369}
370
371/*
372 * Dictionary management. We maintain an in-kernel dictionary to map

Callers 2

ksem_removeFunction · 0.85
ksem_createFunction · 0.85

Calls 2

vaccessFunction · 0.85
priv_check_credFunction · 0.70

Tested by

no test coverage detected