* Audit pipe open method. Explicit privilege check isn't used as this * allows file permissions on the special device to be used to grant audit * review access. Those file permissions should be managed carefully. */
| 669 | * review access. Those file permissions should be managed carefully. |
| 670 | */ |
| 671 | static int |
| 672 | audit_pipe_open(struct cdev *dev, int oflags, int devtype, struct thread *td) |
| 673 | { |
| 674 | struct audit_pipe *ap; |
| 675 | int error; |
| 676 | |
| 677 | ap = audit_pipe_alloc(); |
| 678 | if (ap == NULL) |
| 679 | return (ENOMEM); |
| 680 | fsetown(td->td_proc->p_pid, &ap->ap_sigio); |
| 681 | error = devfs_set_cdevpriv(ap, audit_pipe_dtor); |
| 682 | if (error != 0) |
| 683 | audit_pipe_dtor(ap); |
| 684 | return (error); |
| 685 | } |
| 686 | |
| 687 | /* |
| 688 | * Audit pipe ioctl() routine. Handle file descriptor and audit pipe layer |
nothing calls this directly
no test coverage detected