aboutsummaryrefslogtreecommitdiffstats
path: root/security/integrity/ima/ima_api.c
diff options
context:
space:
mode:
authorPetr Vorel <[email protected]>2021-10-08 09:14:30 +0000
committerMimi Zohar <[email protected]>2021-10-10 02:17:58 +0000
commitcc4299ea039972e57e219e2981b74967c133d41c (patch)
treedbf838cdd0fbdb3d3ad8c8a83c1e7b140d9e96b9 /security/integrity/ima/ima_api.c
parentima_policy: Remove duplicate 'the' in docs comment (diff)
downloadkernel-cc4299ea039972e57e219e2981b74967c133d41c.tar.gz
kernel-cc4299ea039972e57e219e2981b74967c133d41c.zip
ima: Use strscpy instead of strlcpy
strlcpy is deprecated, use its safer replacement. Signed-off-by: Petr Vorel <[email protected]> Signed-off-by: Mimi Zohar <[email protected]>
Diffstat (limited to 'security/integrity/ima/ima_api.c')
-rw-r--r--security/integrity/ima/ima_api.c2
1 files changed, 1 insertions, 1 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;
}