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

Function mqf_chmod

freebsd/kern/uipc_mqueue.c:2561–2579  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2559}
2560
2561static int
2562mqf_chmod(struct file *fp, mode_t mode, struct ucred *active_cred,
2563 struct thread *td)
2564{
2565 struct mqfs_node *pn;
2566 int error;
2567
2568 error = 0;
2569 pn = fp->f_data;
2570 sx_xlock(&mqfs_data.mi_lock);
2571 error = vaccess(VREG, pn->mn_mode, pn->mn_uid, pn->mn_gid, VADMIN,
2572 active_cred);
2573 if (error != 0)
2574 goto out;
2575 pn->mn_mode = mode & ACCESSPERMS;
2576out:
2577 sx_xunlock(&mqfs_data.mi_lock);
2578 return (error);
2579}
2580
2581static int
2582mqf_chown(struct file *fp, uid_t uid, gid_t gid, struct ucred *active_cred,

Callers

nothing calls this directly

Calls 1

vaccessFunction · 0.85

Tested by

no test coverage detected