| 462 | } |
| 463 | |
| 464 | static int |
| 465 | shm_truncate(struct file *fp, off_t length, struct ucred *active_cred, |
| 466 | struct thread *td) |
| 467 | { |
| 468 | struct shmfd *shmfd; |
| 469 | #ifdef MAC |
| 470 | int error; |
| 471 | #endif |
| 472 | |
| 473 | shmfd = fp->f_data; |
| 474 | #ifdef MAC |
| 475 | error = mac_posixshm_check_truncate(active_cred, fp->f_cred, shmfd); |
| 476 | if (error) |
| 477 | return (error); |
| 478 | #endif |
| 479 | return (shm_dotruncate(shmfd, length)); |
| 480 | } |
| 481 | |
| 482 | int |
| 483 | shm_ioctl(struct file *fp, u_long com, void *data, struct ucred *active_cred, |
nothing calls this directly
no test coverage detected