diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:40 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:40 +0000 |
commit | fc53809803cd2bc2434e312b19a18fa36776da12 (patch) | |
tree | b4b43bd6538f51965ce32856e9c053d0f90919c8 /src/basic/uid-alloc-range.h | |
parent | Adding upstream version 255.5. (diff) | |
download | systemd-fc53809803cd2bc2434e312b19a18fa36776da12.tar.xz systemd-fc53809803cd2bc2434e312b19a18fa36776da12.zip |
Adding upstream version 256.upstream/256
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/basic/uid-alloc-range.h')
-rw-r--r-- | src/basic/uid-alloc-range.h | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/src/basic/uid-alloc-range.h b/src/basic/uid-alloc-range.h deleted file mode 100644 index 5badde1..0000000 --- a/src/basic/uid-alloc-range.h +++ /dev/null @@ -1,36 +0,0 @@ -/* SPDX-License-Identifier: LGPL-2.1-or-later */ -#pragma once - -#include <stdbool.h> -#include <sys/types.h> - -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); - -bool uid_for_system_journal(uid_t uid); |