hooks.c (db59000ab760f8d77b07b7f2898ff61110f88607) | hooks.c (3ba4bf5f1e2c58bddd84ba27c5aeaf8ca1d36bff) |
---|---|
1/* 2 * NSA Security-Enhanced Linux (SELinux) security module 3 * 4 * This file contains the SELinux hook function implementations. 5 * 6 * Authors: Stephen Smalley, <sds@epoch.ncsc.mil> 7 * Chris Vance, <cvance@nai.com> 8 * Wayne Salamon, <wsalamon@nai.com> --- 3543 unchanged lines hidden (view full) --- 3552 } 3553 3554 return rc; 3555} 3556 3557static int selinux_mmap_file(struct file *file, unsigned long reqprot, 3558 unsigned long prot, unsigned long flags) 3559{ | 1/* 2 * NSA Security-Enhanced Linux (SELinux) security module 3 * 4 * This file contains the SELinux hook function implementations. 5 * 6 * Authors: Stephen Smalley, <sds@epoch.ncsc.mil> 7 * Chris Vance, <cvance@nai.com> 8 * Wayne Salamon, <wsalamon@nai.com> --- 3543 unchanged lines hidden (view full) --- 3552 } 3553 3554 return rc; 3555} 3556 3557static int selinux_mmap_file(struct file *file, unsigned long reqprot, 3558 unsigned long prot, unsigned long flags) 3559{ |
3560 struct common_audit_data ad; 3561 int rc; 3562 3563 if (file) { 3564 ad.type = LSM_AUDIT_DATA_FILE; 3565 ad.u.file = file; 3566 rc = inode_has_perm(current_cred(), file_inode(file), 3567 FILE__MAP, &ad); 3568 if (rc) 3569 return rc; 3570 } 3571 |
|
3560 if (selinux_checkreqprot) 3561 prot = reqprot; 3562 3563 return file_map_prot_check(file, prot, 3564 (flags & MAP_TYPE) == MAP_SHARED); 3565} 3566 3567static int selinux_file_mprotect(struct vm_area_struct *vma, --- 2960 unchanged lines hidden --- | 3572 if (selinux_checkreqprot) 3573 prot = reqprot; 3574 3575 return file_map_prot_check(file, prot, 3576 (flags & MAP_TYPE) == MAP_SHARED); 3577} 3578 3579static int selinux_file_mprotect(struct vm_area_struct *vma, --- 2960 unchanged lines hidden --- |