FreeBSD/sys/security/audit/audit_pipe.c
/*
 * 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.
 */
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.
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 .
static int
audit_pipe_open(struct cdev *dev, int oflags, int devtype, struct thread *td)
{
	struct audit_pipe *ap;
	int error;
	ap = audit_pipe_alloc();
	if (ap == NULL)
		return (ENOMEM);
	fsetown(td->td_proc->p_pid, &ap->ap_sigio);
	error = devfs_set_cdevpriv(ap, audit_pipe_dtor);
	if (error != 0)
		audit_pipe_dtor(ap);
	return (error);
}
static int audit_pipe_open ( struct cdev * dev , int oflags , int devtype , struct thread * td ) { struct audit_pipe * ap ; int error ; ap = audit_pipe_alloc ( ) ; if ( ap == NULL ) return ( ENOMEM ) ; fsetown ( td -> td_proc -> p_pid , & ap -> ap_sigio ) ; error = devfs_set_cdevpriv ( ap , audit_pipe_dtor ) ; if ( error != 0 ) audit_pipe_dtor ( ap ) ; return ( error ) ; }
Audit pipe open method.
Audit pipe open method .