Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/kern_exec.c
| Show First 20 Lines • Show All 1,821 Lines • ▼ Show 20 Lines | exec_check_permissions(struct image_params *imgp) | ||||
| struct vnode *vp = imgp->vp; | struct vnode *vp = imgp->vp; | ||||
| struct vattr *attr = imgp->attr; | struct vattr *attr = imgp->attr; | ||||
| struct thread *td; | struct thread *td; | ||||
| int error; | int error; | ||||
| td = curthread; | td = curthread; | ||||
| /* Get file attributes */ | /* Get file attributes */ | ||||
| error = VOP_GETATTR(vp, attr, td->td_ucred); | error = VOP_GETATTR(vp, 0, attr, td->td_ucred); | ||||
| if (error) | if (error) | ||||
| return (error); | return (error); | ||||
| #ifdef MAC | #ifdef MAC | ||||
| error = mac_vnode_check_exec(td->td_ucred, imgp->vp, imgp); | error = mac_vnode_check_exec(td->td_ucred, imgp->vp, imgp); | ||||
| if (error) | if (error) | ||||
| return (error); | return (error); | ||||
| #endif | #endif | ||||
| ▲ Show 20 Lines • Show All 258 Lines • Show Last 20 Lines | |||||