summaryrefslogtreecommitdiffstats
path: root/src/shared/user-record.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-11-12 18:50:44 +0100
committerLennart Poettering <lennart@poettering.net>2021-11-13 08:10:11 +0100
commitb085d2240658bed3eb313777fe7b766797fff71d (patch)
treebb1fc9b7face6f1eae01e2f498f28141419dcc1e /src/shared/user-record.h
parenthomework: sync dir after moving file in, not before (diff)
downloadsystemd-b085d2240658bed3eb313777fe7b766797fff71d.tar.xz
systemd-b085d2240658bed3eb313777fe7b766797fff71d.zip
shared: split out UID allocation range stuff from user-record.h
user-record.[ch] are about the UserRecord JSON stuff, and the UID allocation range stuff (i.e. login.defs handling) is a very different thing, and complex enough on its own, let's give it its own c/h files. No code changes, just some splitting out of code.
Diffstat (limited to 'src/shared/user-record.h')
-rw-r--r--src/shared/user-record.h29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/shared/user-record.h b/src/shared/user-record.h
index bc160a0a5e..c72bef4a72 100644
--- a/src/shared/user-record.h
+++ b/src/shared/user-record.h
@@ -17,35 +17,6 @@
/* The default disk size to use when nothing else is specified, relative to free disk space */
#define USER_DISK_SIZE_DEFAULT_PERCENT 85
-bool uid_is_system(uid_t uid);
-bool gid_is_system(gid_t gid);
-
-static inline bool uid_is_dynamic(uid_t uid) {
- return DYNAMIC_UID_MIN <= uid && uid <= DYNAMIC_UID_MAX;
-}
-
-static inline bool gid_is_dynamic(gid_t gid) {
- return uid_is_dynamic((uid_t) gid);
-}
-
-static inline bool uid_is_container(uid_t uid) {
- return CONTAINER_UID_BASE_MIN <= uid && uid <= CONTAINER_UID_BASE_MAX;
-}
-
-static inline bool gid_is_container(gid_t gid) {
- return uid_is_container((uid_t) gid);
-}
-
-typedef struct UGIDAllocationRange {
- uid_t system_alloc_uid_min;
- uid_t system_uid_max;
- gid_t system_alloc_gid_min;
- gid_t system_gid_max;
-} UGIDAllocationRange;
-
-int read_login_defs(UGIDAllocationRange *ret_defs, const char *path, const char *root);
-const UGIDAllocationRange *acquire_ugid_allocation_range(void);
-
typedef enum UserDisposition {
USER_INTRINSIC, /* root and nobody */
USER_SYSTEM, /* statically allocated users for system services */