From: Jia Zhang <zhang.jia@linux.alibaba.com> To: zohar@linux.ibm.com, pvorel@suse.cz Cc: linux-integrity@vger.kernel.org, ltp@lists.linux.it, zhang.jia@linux.alibaba.com Subject: [PATCH 4/6] ima: Code cleanup Date: Tue, 15 Jan 2019 10:14:34 +0800 [thread overview] Message-ID: <1547518476-34008-5-git-send-email-zhang.jia@linux.alibaba.com> (raw) In-Reply-To: <1547518476-34008-1-git-send-email-zhang.jia@linux.alibaba.com> - Change the legacy function name from PATH_CHECK to FILE_CHECK. - Use the variable IMA_POLICY instead of hard code path. Signed-off-by: Jia Zhang <zhang.jia@linux.alibaba.com> Reviewed-by: Mimi Zohar <zohar@linux.ibm.com> --- testcases/kernel/security/integrity/ima/policy/measure.policy | 2 +- testcases/kernel/security/integrity/ima/policy/measure.policy-invalid | 2 +- testcases/kernel/security/integrity/ima/tests/ima_policy.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/testcases/kernel/security/integrity/ima/policy/measure.policy b/testcases/kernel/security/integrity/ima/policy/measure.policy index c68e722..9976ddf 100644 --- a/testcases/kernel/security/integrity/ima/policy/measure.policy +++ b/testcases/kernel/security/integrity/ima/policy/measure.policy @@ -13,4 +13,4 @@ dont_measure fsmagic=0x01021994 dont_measure fsmagic=0x73636673 measure func=FILE_MMAP mask=MAY_EXEC measure func=BPRM_CHECK mask=MAY_EXEC -measure func=PATH_CHECK mask=MAY_READ uid=0 +measure func=FILE_CHECK mask=MAY_READ uid=0 diff --git a/testcases/kernel/security/integrity/ima/policy/measure.policy-invalid b/testcases/kernel/security/integrity/ima/policy/measure.policy-invalid index e406757..04dff89 100644 --- a/testcases/kernel/security/integrity/ima/policy/measure.policy-invalid +++ b/testcases/kernel/security/integrity/ima/policy/measure.policy-invalid @@ -13,4 +13,4 @@ dont_measure fsmagic=0x01021994 dnt_measure fsmagic=0x73636673 measure func=FILE_MMAP mask=MAY_EXEC measure func=BPRM_CHECK mask=MAY_EXEC -measure func=PATH_CHECK mask=MAY_READ uid=0 +measure func=FILE_CHECK mask=MAY_READ uid=0 diff --git a/testcases/kernel/security/integrity/ima/tests/ima_policy.sh b/testcases/kernel/security/integrity/ima/tests/ima_policy.sh index 64aa8cb..a0c7869 100755 --- a/testcases/kernel/security/integrity/ima/tests/ima_policy.sh +++ b/testcases/kernel/security/integrity/ima/tests/ima_policy.sh @@ -28,7 +28,7 @@ check_policy_writable() { local err="IMA policy already loaded and kernel not configured to enable multiple writes to it (need CONFIG_IMA_WRITE_POLICY=y)" - [ -f /sys/kernel/security/ima/policy ] || tst_brk TCONF "$err" + [ -f $IMA_POLICY ] || tst_brk TCONF "$err" # CONFIG_IMA_READ_POLICY echo "" 2> log > $IMA_POLICY grep -q "Device or resource busy" log && tst_brk TCONF "$err" -- 1.8.3.1
WARNING: multiple messages have this Message-ID (diff)
From: Jia Zhang <zhang.jia@linux.alibaba.com> To: ltp@lists.linux.it Subject: [LTP] [PATCH 4/6] ima: Code cleanup Date: Tue, 15 Jan 2019 10:14:34 +0800 [thread overview] Message-ID: <1547518476-34008-5-git-send-email-zhang.jia@linux.alibaba.com> (raw) In-Reply-To: <1547518476-34008-1-git-send-email-zhang.jia@linux.alibaba.com> - Change the legacy function name from PATH_CHECK to FILE_CHECK. - Use the variable IMA_POLICY instead of hard code path. Signed-off-by: Jia Zhang <zhang.jia@linux.alibaba.com> Reviewed-by: Mimi Zohar <zohar@linux.ibm.com> --- testcases/kernel/security/integrity/ima/policy/measure.policy | 2 +- testcases/kernel/security/integrity/ima/policy/measure.policy-invalid | 2 +- testcases/kernel/security/integrity/ima/tests/ima_policy.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/testcases/kernel/security/integrity/ima/policy/measure.policy b/testcases/kernel/security/integrity/ima/policy/measure.policy index c68e722..9976ddf 100644 --- a/testcases/kernel/security/integrity/ima/policy/measure.policy +++ b/testcases/kernel/security/integrity/ima/policy/measure.policy @@ -13,4 +13,4 @@ dont_measure fsmagic=0x01021994 dont_measure fsmagic=0x73636673 measure func=FILE_MMAP mask=MAY_EXEC measure func=BPRM_CHECK mask=MAY_EXEC -measure func=PATH_CHECK mask=MAY_READ uid=0 +measure func=FILE_CHECK mask=MAY_READ uid=0 diff --git a/testcases/kernel/security/integrity/ima/policy/measure.policy-invalid b/testcases/kernel/security/integrity/ima/policy/measure.policy-invalid index e406757..04dff89 100644 --- a/testcases/kernel/security/integrity/ima/policy/measure.policy-invalid +++ b/testcases/kernel/security/integrity/ima/policy/measure.policy-invalid @@ -13,4 +13,4 @@ dont_measure fsmagic=0x01021994 dnt_measure fsmagic=0x73636673 measure func=FILE_MMAP mask=MAY_EXEC measure func=BPRM_CHECK mask=MAY_EXEC -measure func=PATH_CHECK mask=MAY_READ uid=0 +measure func=FILE_CHECK mask=MAY_READ uid=0 diff --git a/testcases/kernel/security/integrity/ima/tests/ima_policy.sh b/testcases/kernel/security/integrity/ima/tests/ima_policy.sh index 64aa8cb..a0c7869 100755 --- a/testcases/kernel/security/integrity/ima/tests/ima_policy.sh +++ b/testcases/kernel/security/integrity/ima/tests/ima_policy.sh @@ -28,7 +28,7 @@ check_policy_writable() { local err="IMA policy already loaded and kernel not configured to enable multiple writes to it (need CONFIG_IMA_WRITE_POLICY=y)" - [ -f /sys/kernel/security/ima/policy ] || tst_brk TCONF "$err" + [ -f $IMA_POLICY ] || tst_brk TCONF "$err" # CONFIG_IMA_READ_POLICY echo "" 2> log > $IMA_POLICY grep -q "Device or resource busy" log && tst_brk TCONF "$err" -- 1.8.3.1
next prev parent reply other threads:[~2019-01-15 2:16 UTC|newest] Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-01-15 2:14 [PATCH v2 0/6] LTP IMA fix bundle Jia Zhang 2019-01-15 2:14 ` [LTP] " Jia Zhang 2019-01-15 2:14 ` [PATCH 1/6] ima/ima_boot_aggregate: Fix the definition of event log Jia Zhang 2019-01-15 2:14 ` [LTP] " Jia Zhang 2019-01-15 2:14 ` [PATCH 2/6] ima/ima_boot_aggregate: Don't hard code the length of sha1 hash Jia Zhang 2019-01-15 2:14 ` [LTP] " Jia Zhang 2019-01-15 2:14 ` [PATCH 3/6] ima/ima_boot_aggregate: Fix extending PCRs beyond PCR 0-7 Jia Zhang 2019-01-15 2:14 ` [LTP] " Jia Zhang 2019-01-15 2:14 ` Jia Zhang [this message] 2019-01-15 2:14 ` [LTP] [PATCH 4/6] ima: Code cleanup Jia Zhang 2019-01-15 2:14 ` [PATCH 5/6] ima: Rename the folder name for policy files to datafiles Jia Zhang 2019-01-15 2:14 ` [LTP] " Jia Zhang 2019-01-15 2:14 ` [PATCH 6/6] ima/ima_violations: Temporarily remove the printk rate limit Jia Zhang 2019-01-15 2:14 ` [LTP] " Jia Zhang 2019-01-15 15:07 ` Petr Vorel 2019-01-15 15:07 ` [LTP] " Petr Vorel 2019-01-15 16:42 ` Jia Zhang 2019-01-15 16:42 ` [LTP] " Jia Zhang 2019-01-15 17:24 ` Petr Vorel 2019-01-15 17:24 ` [LTP] " Petr Vorel 2019-01-16 2:53 ` Jia Zhang 2019-01-16 2:53 ` [LTP] " Jia Zhang 2019-01-15 18:34 ` [LTP] [PATCH v2 0/6] LTP IMA fix bundle Petr Vorel -- strict thread matches above, loose matches on Subject: below -- 2019-01-07 2:26 [PATCH " Jia Zhang 2019-01-07 2:26 ` [PATCH 4/6] ima: Code cleanup Jia Zhang 2019-01-14 21:09 ` Mimi Zohar
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1547518476-34008-5-git-send-email-zhang.jia@linux.alibaba.com \ --to=zhang.jia@linux.alibaba.com \ --cc=linux-integrity@vger.kernel.org \ --cc=ltp@lists.linux.it \ --cc=pvorel@suse.cz \ --cc=zohar@linux.ibm.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.