* [PATCH v6 1/2] ima_policy: Remove duplicate 'the' in docs comment
2021-10-08 9:14 [PATCH v6 0/2] IMA checkpatch fixes Petr Vorel
@ 2021-10-08 9:14 ` Petr Vorel
2021-10-08 9:14 ` [PATCH v6 2/2] ima: Use strscpy instead of strlcpy Petr Vorel
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Petr Vorel @ 2021-10-08 9:14 UTC (permalink / raw)
To: linux-integrity; +Cc: Petr Vorel, Alex Henrie, alexhenrie24, Mimi Zohar
Also join string (short enough to be on single line).
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
security/integrity/ima/ima_policy.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c
index ad3c2af5f163..a4396967dce4 100644
--- a/security/integrity/ima/ima_policy.c
+++ b/security/integrity/ima/ima_policy.c
@@ -885,8 +885,7 @@ static int __init ima_init_arch_policy(void)
/**
* ima_init_policy - initialize the default measure rules.
*
- * ima_rules points to either the ima_default_rules or the
- * the new ima_policy_rules.
+ * ima_rules points to either the ima_default_rules or the new ima_policy_rules.
*/
void __init ima_init_policy(void)
{
--
2.33.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v6 2/2] ima: Use strscpy instead of strlcpy
2021-10-08 9:14 [PATCH v6 0/2] IMA checkpatch fixes Petr Vorel
2021-10-08 9:14 ` [PATCH v6 1/2] ima_policy: Remove duplicate 'the' in docs comment Petr Vorel
@ 2021-10-08 9:14 ` Petr Vorel
2021-10-08 9:49 ` [PATCH v6 0/2] IMA checkpatch fixes Petr Vorel
2021-10-11 12:08 ` Mimi Zohar
3 siblings, 0 replies; 7+ messages in thread
From: Petr Vorel @ 2021-10-08 9:14 UTC (permalink / raw)
To: linux-integrity; +Cc: Petr Vorel, Alex Henrie, alexhenrie24, Mimi Zohar
strlcpy is deprecated, use its safer replacement.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
security/integrity/ima/ima_api.c | 2 +-
security/integrity/ima/ima_policy.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/security/integrity/ima/ima_api.c b/security/integrity/ima/ima_api.c
index 2c6c3a5228b5..a64fb0130b01 100644
--- a/security/integrity/ima/ima_api.c
+++ b/security/integrity/ima/ima_api.c
@@ -403,7 +403,7 @@ const char *ima_d_path(const struct path *path, char **pathbuf, char *namebuf)
}
if (!pathname) {
- strlcpy(namebuf, path->dentry->d_name.name, NAME_MAX);
+ strscpy(namebuf, path->dentry->d_name.name, NAME_MAX);
pathname = namebuf;
}
diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c
index a4396967dce4..f136ef2b0225 100644
--- a/security/integrity/ima/ima_policy.c
+++ b/security/integrity/ima/ima_policy.c
@@ -866,7 +866,7 @@ static int __init ima_init_arch_policy(void)
char rule[255];
int result;
- result = strlcpy(rule, *rules, sizeof(rule));
+ result = strscpy(rule, *rules, sizeof(rule));
INIT_LIST_HEAD(&arch_policy_entry[i].list);
result = ima_parse_rule(rule, &arch_policy_entry[i]);
--
2.33.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v6 0/2] IMA checkpatch fixes
2021-10-08 9:14 [PATCH v6 0/2] IMA checkpatch fixes Petr Vorel
2021-10-08 9:14 ` [PATCH v6 1/2] ima_policy: Remove duplicate 'the' in docs comment Petr Vorel
2021-10-08 9:14 ` [PATCH v6 2/2] ima: Use strscpy instead of strlcpy Petr Vorel
@ 2021-10-08 9:49 ` Petr Vorel
2021-10-11 12:08 ` Mimi Zohar
3 siblings, 0 replies; 7+ messages in thread
From: Petr Vorel @ 2021-10-08 9:49 UTC (permalink / raw)
To: linux-integrity; +Cc: Alex Henrie, alexhenrie24, Mimi Zohar
Hi all,
Ah, version of this patchset is obviously 1, not 6.
Kind regards,
Petr
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v6 0/2] IMA checkpatch fixes
2021-10-08 9:14 [PATCH v6 0/2] IMA checkpatch fixes Petr Vorel
` (2 preceding siblings ...)
2021-10-08 9:49 ` [PATCH v6 0/2] IMA checkpatch fixes Petr Vorel
@ 2021-10-11 12:08 ` Mimi Zohar
2021-10-11 12:46 ` Petr Vorel
2021-10-11 20:15 ` Alex Henrie
3 siblings, 2 replies; 7+ messages in thread
From: Mimi Zohar @ 2021-10-11 12:08 UTC (permalink / raw)
To: Petr Vorel, linux-integrity; +Cc: Alex Henrie, alexhenrie24
Hi Petr, Alex,
On Fri, 2021-10-08 at 11:14 +0200, Petr Vorel wrote:
> Hi,
>
> very minor checkpatch fixes based on [v3,2/2] ima: add gid support patchset [1].
These and the original gid patch set are now queued in next-integrity-
testing.
thanks,
Mimi
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v6 0/2] IMA checkpatch fixes
2021-10-11 12:08 ` Mimi Zohar
@ 2021-10-11 12:46 ` Petr Vorel
2021-10-11 20:15 ` Alex Henrie
1 sibling, 0 replies; 7+ messages in thread
From: Petr Vorel @ 2021-10-11 12:46 UTC (permalink / raw)
To: Mimi Zohar; +Cc: linux-integrity, Alex Henrie, alexhenrie24
Hi Mimi,
> Hi Petr, Alex,
> On Fri, 2021-10-08 at 11:14 +0200, Petr Vorel wrote:
> > Hi,
> > very minor checkpatch fixes based on [v3,2/2] ima: add gid support patchset [1].
> These and the original gid patch set are now queued in next-integrity-
> testing.
Thanks!
Kind regards,
Petr
> thanks,
> Mimi
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v6 0/2] IMA checkpatch fixes
2021-10-11 12:08 ` Mimi Zohar
2021-10-11 12:46 ` Petr Vorel
@ 2021-10-11 20:15 ` Alex Henrie
1 sibling, 0 replies; 7+ messages in thread
From: Alex Henrie @ 2021-10-11 20:15 UTC (permalink / raw)
To: Mimi Zohar; +Cc: Petr Vorel, linux-integrity, alexhenrie24
On Mon, 11 Oct 2021 08:08:01 -0400
Mimi Zohar <zohar@linux.ibm.com> wrote:
> Hi Petr, Alex,
>
> On Fri, 2021-10-08 at 11:14 +0200, Petr Vorel wrote:
> > Hi,
> >
> > very minor checkpatch fixes based on [v3,2/2] ima: add gid support patchset [1].
>
> These and the original gid patch set are now queued in next-integrity-
> testing.
Thank you!
-Alex
^ permalink raw reply [flat|nested] 7+ messages in thread