* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: mmap_min_addr check CAP_SYS_RAWIO only for write
Unified · Split
| @@ -33,7 +33,7 @@ int mmap_min_addr_handler(struct ctl_table *table, int write, · 32 unmodified lines | ||
| 33 | 33 | { |
| 34 | 34 | int ret; |
| 35 | 35 | |
| 36 | − if (!capable(CAP_SYS_RAWIO)) | |
| 36 | + if (write && !capable(CAP_SYS_RAWIO)) | |
| 37 | 37 | return -EPERM; |
| 38 | 38 | |
| 39 | 39 | ret = proc_doulongvec_minmax(table, write, buffer, lenp, ppos); |