summaryrefslogtreecommitdiff
path: root/src/basic/user-util.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2022-02-16 14:53:57 +0100
committerLennart Poettering <lennart@poettering.net>2022-02-16 22:40:06 +0100
commit76ef5d0493ed03499a06b1aa3e46a39fe58f288c (patch)
treeac5e1fffde49ed4dab58c3d2bec3a0676250036c /src/basic/user-util.h
parentfc03e80c6b19521ecf4f3af06865b2054e685f9a (diff)
downloadsystemd-76ef5d0493ed03499a06b1aa3e46a39fe58f288c.tar.gz
user-util: move homed/nspawn map UID_MIN/UID_MAX define into user-util.h
Let's have them at a common place, so that we have the ranges altogether at a minimal set of places.
Diffstat (limited to 'src/basic/user-util.h')
-rw-r--r--src/basic/user-util.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/basic/user-util.h b/src/basic/user-util.h
index bc76de6b41..40979d1080 100644
--- a/src/basic/user-util.h
+++ b/src/basic/user-util.h
@@ -12,6 +12,14 @@
#include <sys/types.h>
#include <unistd.h>
+/* Users managed by systemd-homed. See https://systemd.io/UIDS-GIDS for details how this range fits into the rest of the world */
+#define HOME_UID_MIN 60001
+#define HOME_UID_MAX 60513
+
+/* Users mapped from host into a container */
+#define MAP_UID_MIN 60514
+#define MAP_UID_MAX 60577
+
bool uid_is_valid(uid_t uid);
static inline bool gid_is_valid(gid_t gid) {