From: Markus Elfring <Markus.Elfring@web.de> To: linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, Dmitry Kasatkin <dmitry.kasatkin@gmail.com>, James Morris <jmorris@namei.org>, Mimi Zohar <zohar@linux.ibm.com>, "Serge E. Hallyn" <serge@hallyn.com> Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org Subject: [PATCH] ima: Replace two seq_printf() calls by seq_puts() in ima_show_template_data_ascii() Date: Tue, 2 Jul 2019 21:00:33 +0200 [thread overview] Message-ID: <7f60a9e1-3002-3186-2a30-50b69abd0cc7@web.de> (raw) From: Markus Elfring <elfring@users.sourceforge.net> Date: Tue, 2 Jul 2019 20:52:21 +0200 Two strings which did not contain a data format specification should be put into a sequence. Thus use the corresponding function “seq_puts”. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> --- security/integrity/ima/ima_template_lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/security/integrity/ima/ima_template_lib.c b/security/integrity/ima/ima_template_lib.c index 9fe0ef7f91e2..05636e9b19b1 100644 --- a/security/integrity/ima/ima_template_lib.c +++ b/security/integrity/ima/ima_template_lib.c @@ -74,7 +74,7 @@ static void ima_show_template_data_ascii(struct seq_file *m, case DATA_FMT_DIGEST_WITH_ALGO: buf_ptr = strnchr(field_data->data, buflen, ':'); if (buf_ptr != field_data->data) - seq_printf(m, "%s", field_data->data); + seq_puts(m, field_data->data); /* skip ':' and '\0' */ buf_ptr += 2; @@ -87,7 +87,7 @@ static void ima_show_template_data_ascii(struct seq_file *m, ima_print_digest(m, buf_ptr, buflen); break; case DATA_FMT_STRING: - seq_printf(m, "%s", buf_ptr); + seq_puts(m, buf_ptr); break; default: break; -- 2.22.0
WARNING: multiple messages have this Message-ID (diff)
From: Markus Elfring <Markus.Elfring@web.de> To: linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, Dmitry Kasatkin <dmitry.kasatkin@gmail.com>, James Morris <jmorris@namei.org>, Mimi Zohar <zohar@linux.ibm.com>, "Serge E. Hallyn" <serge@hallyn.com> Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org Subject: [PATCH] ima: Replace two seq_printf() calls by seq_puts() in ima_show_template_data_ascii() Date: Tue, 02 Jul 2019 19:00:33 +0000 [thread overview] Message-ID: <7f60a9e1-3002-3186-2a30-50b69abd0cc7@web.de> (raw) In-Reply-To: <e96eac40-0745-80b5-6aab-f872e6415031@web.de> From: Markus Elfring <elfring@users.sourceforge.net> Date: Tue, 2 Jul 2019 20:52:21 +0200 Two strings which did not contain a data format specification should be put into a sequence. Thus use the corresponding function “seq_puts”. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> --- security/integrity/ima/ima_template_lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/security/integrity/ima/ima_template_lib.c b/security/integrity/ima/ima_template_lib.c index 9fe0ef7f91e2..05636e9b19b1 100644 --- a/security/integrity/ima/ima_template_lib.c +++ b/security/integrity/ima/ima_template_lib.c @@ -74,7 +74,7 @@ static void ima_show_template_data_ascii(struct seq_file *m, case DATA_FMT_DIGEST_WITH_ALGO: buf_ptr = strnchr(field_data->data, buflen, ':'); if (buf_ptr != field_data->data) - seq_printf(m, "%s", field_data->data); + seq_puts(m, field_data->data); /* skip ':' and '\0' */ buf_ptr += 2; @@ -87,7 +87,7 @@ static void ima_show_template_data_ascii(struct seq_file *m, ima_print_digest(m, buf_ptr, buflen); break; case DATA_FMT_STRING: - seq_printf(m, "%s", buf_ptr); + seq_puts(m, buf_ptr); break; default: break; -- 2.22.0
next reply other threads:[~2019-07-02 19:00 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-07-02 19:00 Markus Elfring [this message] 2019-07-02 19:00 ` [PATCH] ima: Replace two seq_printf() calls by seq_puts() in ima_show_template_data_ascii() Markus Elfring 2019-07-02 19:00 Markus Elfring 2019-07-02 19:00 ` Markus Elfring 2019-07-03 9:16 ` David Laight 2019-07-03 9:16 ` David Laight 2019-07-03 9:33 ` Markus Elfring 2019-07-03 9:33 ` Markus Elfring 2019-07-03 11:14 ` [PATCH] " Mimi Zohar 2019-07-03 11:14 ` Mimi Zohar 2019-07-02 19:00 Markus Elfring 2019-07-02 19:00 ` Markus Elfring 2019-07-02 19:00 Markus Elfring 2019-07-02 19:00 ` 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=7f60a9e1-3002-3186-2a30-50b69abd0cc7@web.de \ --to=markus.elfring@web.de \ --cc=dmitry.kasatkin@gmail.com \ --cc=jmorris@namei.org \ --cc=kernel-janitors@vger.kernel.org \ --cc=linux-integrity@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-security-module@vger.kernel.org \ --cc=serge@hallyn.com \ --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.