ima: Add a space after printing a LSM rule for readability
Subsystems (4)
PATCH 1/1 ima: Add a space after printing a LSM rule for readability
From: Clay Chang <[email protected]>
When reading ima_policy from securityfs, there is a missing space between output string of LSM rules.
--- security/integrity/ima/ima_policy.c | 1 + 1 file changed, 1 insertion(+)
security/integrity/ima/ima_policy.c +1 -0
@@ -1496,6 +1496,7 @@ int ima_policy_show(struct seq_file *m, void *v) (char *)entry->lsm[i].args_p);break ; } +seq_puts (m," " ); } }if (entry->template)
Signature · 1 line
2.18.1
Mimi Zohar
maintainerQuoted 1 line · On Fri, 2020-01-03 at 15:51 +0800, [email protected] wrote:
From: Clay Chang <[email protected]>
Normally this "From" line is only seen when the sender isn't the patch author. Any ideas what happened?
Quoted 5 lines
When reading
ima_policyfrom securityfs, there is a missing space between output string of LSM rules.Signed-off-by Clay Chang <[email protected]>
Good catch! IMA policy rules based on LSM labels are used to constrain which files are in policy. Normally a single LSM label is enough (e.g. dont_measure obj_type=auditd_log_t). Could you include in this patch description a use case where multiple LSM labels are needed?
thanks,
Mimi
Quoted 16 lines
--- security/integrity/ima/ima_policy.c | 1 + 1 file changed, 1 insertion(+)security/integrity/ima/ima_policy.c +1
-0@@ -1496,6 +1496,7 @@ int ima_policy_show(struct seq_file *m, void *v) (char *)entry->lsm[i].args_p);break ; } +seq_puts (m," " ); } }if (entry->template)
Quoted 6 lines · Mimi Zohar
Quoted 1 line · On Fri, 2020-01-03 at 15:51 +0800, [email protected] wrote:
From: Clay Chang <[email protected]>
Normally this "From" line is only seen when the sender isn't the patch author. Any ideas what happened?
Hi Mimi,
Apparently I should not use "--from" in git-send-email command.
Quoted 4 lines
Quoted 4 lines
When reading
ima_policyfrom securityfs, there is a missing space between output string of LSM rules.
Quoted 8 lines
Quoted 1 line
Signed-off-by Clay Chang <[email protected]>Good catch! IMA policy rules based on LSM labels are used to constrain which files are in policy. Normally a single LSM label is enough (e.g.
dont_measureobj_type=auditd_log_t). Could you include in this patch description a use case where multiple LSM labels are needed?
Apology for not expressed my intention clearly. The intention of this patch is to add a space after printing LSM rules (if any) and the remaining rules.
Currently, if I have a policy, for example:
appraise func=BPRM_CHECK obj_type=shell_exec_t appraise_type=imasig
The read back result is:
appraise func=BPRM_CHECK obj_type=shell_exec_tappraise_type=imasig
which is not correct.
I do not have a case for multiple LSM labels, but if there is one such case, this patch will also apply.
I will post a v2 patch with tuned description.
Thanks,
Clay