Commit cc4299ea authored by Petr Vorel's avatar Petr Vorel Committed by Mimi Zohar

ima: Use strscpy instead of strlcpy

strlcpy is deprecated, use its safer replacement.
Signed-off-by: default avatarPetr Vorel <pvorel@suse.cz>
Signed-off-by: default avatarMimi Zohar <zohar@linux.ibm.com>
parent 61868acb
......@@ -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;
}
......
......@@ -870,7 +870,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]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment