| 2559 | } |
| 2560 | |
| 2561 | static int |
| 2562 | mqf_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; |
| 2576 | out: |
| 2577 | sx_xunlock(&mqfs_data.mi_lock); |
| 2578 | return (error); |
| 2579 | } |
| 2580 | |
| 2581 | static int |
| 2582 | mqf_chown(struct file *fp, uid_t uid, gid_t gid, struct ucred *active_cred, |