mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-15 13:47:41 +00:00
seccomp: error on unrecognized actions
Be more strict about unrecognized actions. Previously the parser would happily accept lines with typos like: kexec_load errrno 1 (note the extra 'r') Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
9dbd8ff383
commit
7474b5b33f
@ -114,6 +114,9 @@ static uint32_t get_v2_default_action(char *line)
|
|||||||
ret_action = SCMP_ACT_ALLOW;
|
ret_action = SCMP_ACT_ALLOW;
|
||||||
} else if (strncmp(line, "trap", 4) == 0) {
|
} else if (strncmp(line, "trap", 4) == 0) {
|
||||||
ret_action = SCMP_ACT_TRAP;
|
ret_action = SCMP_ACT_TRAP;
|
||||||
|
} else if (line[0]) {
|
||||||
|
ERROR("Unrecognized seccomp action: %s", line);
|
||||||
|
return -2;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret_action;
|
return ret_action;
|
||||||
|
Loading…
Reference in New Issue
Block a user