aboutgitcodelistschat:MatrixIRC
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/gluten.h3
-rw-r--r--common/util.c34
2 files changed, 24 insertions, 13 deletions
diff --git a/common/gluten.h b/common/gluten.h
index 6414e20..1f06221 100644
--- a/common/gluten.h
+++ b/common/gluten.h
@@ -147,7 +147,8 @@ BUILD_BUG_ON(BITS_PER_NUM(CONTEXT_TYPE_MAX) + \
enum metadata_type {
UID_TARGET = 0,
GID_TARGET = 1,
- METADATA_MAX = GID_TARGET,
+ PID_TARGET = 2,
+ METADATA_MAX = PID_TARGET,
};
extern const char *metadata_type_str[METADATA_MAX + 1];
diff --git a/common/util.c b/common/util.c
index 8815ecb..3e81a1c 100644
--- a/common/util.c
+++ b/common/util.c
@@ -55,17 +55,27 @@ const char *cmp_type_str[CMP_MAX + 1] = {
"EQ", "NE", "GT", "GE", "LT", "LE",
};
-const char *metadata_type_str[METADATA_MAX + 1] = { "uid", "gid" };
+const char *metadata_type_str[METADATA_MAX + 1] = { "uid", "gid", "pid" };
const char *syscall_name_str[N_SYSCALL + 1] = {
- [__NR_chown] = "chown",
- [__NR_connect] = "connect",
- [__NR_ioctl] = "ioctl",
- [__NR_lchown] = "lchown",
- [__NR_mknod] = "mknod",
- [__NR_mknodat] = "mknodat",
- [__NR_read] = "read",
- [__NR_socket] = "socket",
- [__NR_unshare] = "unshare",
- [__NR_open] = "open",
-
+ [__NR_chown] = "chown",
+ [__NR_connect] = "connect",
+ [__NR_ioctl] = "ioctl",
+ [__NR_lchown] = "lchown",
+ [__NR_mknod] = "mknod",
+ [__NR_mknodat] = "mknodat",
+ [__NR_open] = "open",
+ [__NR_read] = "read",
+ [__NR_sched_get_priority_max] = "sched_get_priority_max",
+ [__NR_sched_get_priority_min] = "sched_get_priority_min",
+ [__NR_sched_getaffinity] = "sched_getaffinity",
+ [__NR_sched_getattr] = "sched_getattr",
+ [__NR_sched_getparam] = "sched_getparam",
+ [__NR_sched_getscheduler] = "sched_getscheduler",
+ [__NR_sched_setaffinity] = "sched_setaffinity",
+ [__NR_sched_setattr] = "sched_setattr",
+ [__NR_sched_setparam] = "sched_setparam",
+ [__NR_sched_setscheduler] = "sched_setscheduler",
+ [__NR_sched_yield] = "sched_yield",
+ [__NR_socket] = "socket",
+ [__NR_unshare] = "unshare",
};