From: Jarkko Sakkinen <jarkko@kernel.org>
To: Petr Vorel <pvorel@suse.cz>
Cc: keyrings@vger.kernel.org, David Howells <dhowells@redhat.com>,
James Morris <jmorris@namei.org>,
Paul Moore <paul@paul-moore.com>,
linux-security-module@vger.kernel.org
Subject: Re: [PATCH 1/1] keys/request_key_auth.c: Use strscpy instead of strlcpy
Date: Tue, 6 Sep 2022 08:24:18 +0300 [thread overview]
Message-ID: <YxbZgiHufxAAA+l1@kernel.org> (raw)
In-Reply-To: <20220905160703.30364-1-pvorel@suse.cz>
On Mon, Sep 05, 2022 at 06:07:03PM +0200, Petr Vorel wrote:
> strlcpy is deprecated, use its safer replacement.
>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> security/keys/request_key_auth.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/security/keys/request_key_auth.c b/security/keys/request_key_auth.c
> index 41e9735006d0..8f33cd170e42 100644
> --- a/security/keys/request_key_auth.c
> +++ b/security/keys/request_key_auth.c
> @@ -178,7 +178,7 @@ struct key *request_key_auth_new(struct key *target, const char *op,
> if (!rka->callout_info)
> goto error_free_rka;
> rka->callout_len = callout_len;
> - strlcpy(rka->op, op, sizeof(rka->op));
> + strscpy(rka->op, op, sizeof(rka->op));
>
> /* see if the calling process is already servicing the key request of
> * another process */
> --
> 2.35.3
>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
BR, Jarkko
prev parent reply other threads:[~2022-09-06 5:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-05 16:07 [PATCH 1/1] keys/request_key_auth.c: Use strscpy instead of strlcpy Petr Vorel
2022-09-06 5:24 ` Jarkko Sakkinen [this message]
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=YxbZgiHufxAAA+l1@kernel.org \
--to=jarkko@kernel.org \
--cc=dhowells@redhat.com \
--cc=jmorris@namei.org \
--cc=keyrings@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=pvorel@suse.cz \
/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 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.