linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ima: Replace two seq_printf() calls by seq_puts() in ima_show_template_data_ascii()
@ 2019-07-02 19:00 Markus Elfring
  0 siblings, 0 replies; 6+ messages in thread
From: Markus Elfring @ 2019-07-02 19:00 UTC (permalink / raw)
  To: linux-integrity, linux-security-module, Dmitry Kasatkin,
	James Morris, Mimi Zohar, Serge E. Hallyn
  Cc: LKML, kernel-janitors

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


^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [PATCH] ima: Replace two seq_printf() calls by seq_puts() in ima_show_template_data_ascii()
@ 2019-07-02 19:00 Markus Elfring
  0 siblings, 0 replies; 6+ messages in thread
From: Markus Elfring @ 2019-07-02 19:00 UTC (permalink / raw)
  To: linux-integrity, linux-security-module, Dmitry Kasatkin,
	James Morris, Mimi Zohar, Serge E. Hallyn
  Cc: LKML, kernel-janitors

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


^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [PATCH] ima: Replace two seq_printf() calls by seq_puts() in ima_show_template_data_ascii()
@ 2019-07-02 19:00 Markus Elfring
  2019-07-03  9:16 ` David Laight
  0 siblings, 1 reply; 6+ messages in thread
From: Markus Elfring @ 2019-07-02 19:00 UTC (permalink / raw)
  To: linux-integrity, linux-security-module, Dmitry Kasatkin,
	James Morris, Mimi Zohar, Serge E. Hallyn
  Cc: LKML, kernel-janitors

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


^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [PATCH] ima: Replace two seq_printf() calls by seq_puts() in ima_show_template_data_ascii()
@ 2019-07-02 19:00 Markus Elfring
  0 siblings, 0 replies; 6+ messages in thread
From: Markus Elfring @ 2019-07-02 19:00 UTC (permalink / raw)
  To: linux-integrity, linux-security-module, Dmitry Kasatkin,
	James Morris, Mimi Zohar, Serge E. Hallyn
  Cc: LKML, kernel-janitors

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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-07-03 11:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-02 19:00 [PATCH] ima: Replace two seq_printf() calls by seq_puts() in ima_show_template_data_ascii() Markus Elfring
  -- strict thread matches above, loose matches on Subject: below --
2019-07-02 19:00 Markus Elfring
2019-07-02 19:00 Markus Elfring
2019-07-03  9:16 ` David Laight
2019-07-03 11:14   ` Mimi Zohar
2019-07-02 19:00 Markus Elfring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).