From beeefb214a2dc8917b5a31945e740ecce4536764 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Wed, 28 Jun 2023 17:45:36 +0200 Subject: cooker, seitan: Add support for GID/UID in context Similarly to namespace specifications, the special value "caller", as well as login/group names and numeric UID/GIDs are supported. Example of usage in demo/mknod.hjson. Light on checks and with some TODOs left behind at the moment. Signed-off-by: Stefano Brivio --- common/util.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'common/util.c') diff --git a/common/util.c b/common/util.c index 21676b0..d74e199 100644 --- a/common/util.c +++ b/common/util.c @@ -8,6 +8,9 @@ * Author: Stefano Brivio */ +#include /* TODO: Why isn't __USE_POSIX with limits.h + * enough for LOGIN_NAME_MAX here? + */ #include #include #include @@ -35,7 +38,9 @@ const char *gluten_offset_name[OFFSET_TYPE_MAX + 1] = { }; const char *context_type_name[CONTEXT_TYPE_MAX + 1] = { - "mnt", "cgroup", "uts", "ipc", "user", "pid", "net", "time", "cwd", + "mnt", "cgroup", "uts", "ipc", "user", "pid", "net", "time", + "cwd", + "uid", "gid", }; const char *context_spec_type_name[CONTEXT_SPEC_TYPE_MAX + 1] = { -- cgit v1.2.3