From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-ima-devel@lists.sourceforge.net,
linux-ima-user@lists.sourceforge.net,
linux-security-module@vger.kernel.org,
Dmitry Kasatkin <dmitry.kasatkin@gmail.com>,
James Morris <james.l.morris@oracle.com>,
Mimi Zohar <zohar@linux.vnet.ibm.com>,
"Serge E. Hallyn" <serge@hallyn.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 2/3] ima: Combine two function calls into one in ima_policy_show()
Date: Sun, 7 May 2017 15:42:18 +0200 [thread overview]
Message-ID: <cd8a009f-c61b-4a7d-596a-1e2e64edeea6@users.sourceforge.net> (raw)
In-Reply-To: <416e6b01-7abb-d894-3bd6-d8bda05ed6b2@users.sourceforge.net>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 7 May 2017 14:58:55 +0200
A bit of data was put into a sequence by two separate function calls.
Print the same data by a single function call instead.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
security/integrity/ima/ima_policy.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c
index 3ab1067db624..83446a383ace 100644
--- a/security/integrity/ima/ima_policy.c
+++ b/security/integrity/ima/ima_policy.c
@@ -1086,10 +1086,8 @@ int ima_policy_show(struct seq_file *m, void *v)
seq_puts(m, " ");
}
- if (entry->flags & IMA_FSUUID) {
- seq_printf(m, "fsuuid=%pU", entry->fsuuid);
- seq_puts(m, " ");
- }
+ if (entry->flags & IMA_FSUUID)
+ seq_printf(m, "fsuuid=%pU ", entry->fsuuid);
if (entry->flags & IMA_UID) {
snprintf(tbuf, sizeof(tbuf), "%d", __kuid_val(entry->uid));
--
2.12.2
next prev parent reply other threads:[~2017-05-07 23:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-07 13:40 [PATCH 0/3] IMA: Fine-tuning for three function implementations SF Markus Elfring
2017-05-07 13:41 ` [PATCH 1/3] ima: Use seq_putc() in ima_ascii_measurements_show() SF Markus Elfring
2017-05-07 13:42 ` SF Markus Elfring [this message]
2017-05-07 13:43 ` [PATCH 3/3] ima: Replace nine seq_puts() calls by seq_putc() SF Markus Elfring
2017-05-08 14:26 ` [PATCH 0/3] IMA: Fine-tuning for three function implementations Mimi Zohar
2017-05-08 15:26 ` SF Markus Elfring
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=cd8a009f-c61b-4a7d-596a-1e2e64edeea6@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=dmitry.kasatkin@gmail.com \
--cc=james.l.morris@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-ima-devel@lists.sourceforge.net \
--cc=linux-ima-user@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=serge@hallyn.com \
--cc=zohar@linux.vnet.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox