ima_policy.c (cf2222178645e545e96717b2825601321ce4745c) | ima_policy.c (c6af8efe97d87fa308eb1bbd0cf4feb820a4d622) |
---|---|
1/* 2 * Copyright (C) 2008 IBM Corporation 3 * Author: Mimi Zohar <zohar@us.ibm.com> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation, version 2 of the License. 8 * --- 286 unchanged lines hidden (view full) --- 295 if (!(rule->flags & IMA_FUNC)) 296 return IMA_FILE_APPRAISE; 297 298 switch (func) { 299 case MMAP_CHECK: 300 return IMA_MMAP_APPRAISE; 301 case BPRM_CHECK: 302 return IMA_BPRM_APPRAISE; | 1/* 2 * Copyright (C) 2008 IBM Corporation 3 * Author: Mimi Zohar <zohar@us.ibm.com> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation, version 2 of the License. 8 * --- 286 unchanged lines hidden (view full) --- 295 if (!(rule->flags & IMA_FUNC)) 296 return IMA_FILE_APPRAISE; 297 298 switch (func) { 299 case MMAP_CHECK: 300 return IMA_MMAP_APPRAISE; 301 case BPRM_CHECK: 302 return IMA_BPRM_APPRAISE; |
303 case MODULE_CHECK: 304 return IMA_MODULE_APPRAISE; 305 case FIRMWARE_CHECK: 306 return IMA_FIRMWARE_APPRAISE; | |
307 case FILE_CHECK: | 303 case FILE_CHECK: |
308 default: | 304 case POST_SETATTR: |
309 return IMA_FILE_APPRAISE; | 305 return IMA_FILE_APPRAISE; |
306 case MODULE_CHECK ... MAX_CHECK - 1: 307 default: 308 return IMA_READ_APPRAISE; |
|
310 } 311} 312 313/** 314 * ima_match_policy - decision based on LSM and other conditions 315 * @inode: pointer to an inode for which the policy decision is being made 316 * @func: IMA hook identifier 317 * @mask: requested action (MAY_READ | MAY_WRITE | MAY_APPEND | MAY_EXEC) --- 737 unchanged lines hidden --- | 309 } 310} 311 312/** 313 * ima_match_policy - decision based on LSM and other conditions 314 * @inode: pointer to an inode for which the policy decision is being made 315 * @func: IMA hook identifier 316 * @mask: requested action (MAY_READ | MAY_WRITE | MAY_APPEND | MAY_EXEC) --- 737 unchanged lines hidden --- |