mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-16 20:25:34 +00:00
seccomp: get_action_name()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
30448a13ab
commit
f0fd80ae3d
@ -97,7 +97,7 @@ static uint32_t get_v2_default_action(char *line)
|
|||||||
static const char *get_action_name(uint32_t action)
|
static const char *get_action_name(uint32_t action)
|
||||||
{
|
{
|
||||||
/* The upper 16 bits indicate the type of the seccomp action. */
|
/* The upper 16 bits indicate the type of the seccomp action. */
|
||||||
switch(action & 0xffff0000){
|
switch (action & 0xffff0000) {
|
||||||
case SCMP_ACT_KILL:
|
case SCMP_ACT_KILL:
|
||||||
return "kill";
|
return "kill";
|
||||||
case SCMP_ACT_ALLOW:
|
case SCMP_ACT_ALLOW:
|
||||||
@ -106,9 +106,9 @@ static const char *get_action_name(uint32_t action)
|
|||||||
return "trap";
|
return "trap";
|
||||||
case SCMP_ACT_ERRNO(0):
|
case SCMP_ACT_ERRNO(0):
|
||||||
return "errno";
|
return "errno";
|
||||||
default:
|
|
||||||
return "invalid action";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return "invalid action";
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t get_v2_action(char *line, uint32_t def_action)
|
static uint32_t get_v2_action(char *line, uint32_t def_action)
|
||||||
|
Loading…
Reference in New Issue
Block a user