lkml.org 
[lkml]   [2014]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 6/8] ima: remove unnecessary code
On 03/09/14 16:08, Mimi Zohar wrote:
> On Wed, 2014-09-03 at 10:19 +0300, Dmitry Kasatkin wrote:
>> If ima_appraise is 0, then action would not mandate to perform
>> appraisal and ima_appraise_measurement will never be called.
>>
>> Signed-off-by: Dmitry Kasatkin <d.kasatkin@samsung.com>
> The policy determines whether or not a file should be appraised.
> Whether IMA is configured and enabled to appraise files is a different
> issue. The test is not done in process_measurement(), but deferred to
> here.

Hi,

Policy requests honors "ima_appraise" variable.
There wont be any appraisal action if 'ima_appraise' is disabled.

See bellow...

--------------------
int ima_get_action(struct inode *inode, int mask, int function)
{
.........
if (!ima_appraise)
flags &= ~IMA_APPRAISE;
..........
--------------

- Dmitry
> Mimi
>
>> ---
>> security/integrity/ima/ima_appraise.c | 2 --
>> 1 file changed, 2 deletions(-)
>>
>> diff --git a/security/integrity/ima/ima_appraise.c b/security/integrity/ima/ima_appraise.c
>> index 225fd94..013ec3f 100644
>> --- a/security/integrity/ima/ima_appraise.c
>> +++ b/security/integrity/ima/ima_appraise.c
>> @@ -192,8 +192,6 @@ int ima_appraise_measurement(int func, struct integrity_iint_cache *iint,
>> enum integrity_status status = INTEGRITY_UNKNOWN;
>> int rc = xattr_len, hash_start = 0;
>>
>> - if (!ima_appraise)
>> - return 0;
>> if (!inode->i_op->getxattr)
>> return INTEGRITY_UNKNOWN;
>>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>



\
 
 \ /
  Last update: 2014-09-03 16:01    [W:0.071 / U:14.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site