diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-12-04 17:06:56 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-12-06 13:40:50 +0100 |
commit | 3a664727fa95e9683da33770e88aaaa1a3183cc6 (patch) | |
tree | 0920799bbc99e374624ce8a8426156b60a177b12 /src/basic | |
parent | 834382779304c6f8b1994dcafaa748d798f533b6 (diff) | |
download | systemd-3a664727fa95e9683da33770e88aaaa1a3183cc6.tar.gz systemd-3a664727fa95e9683da33770e88aaaa1a3183cc6.tar.bz2 systemd-3a664727fa95e9683da33770e88aaaa1a3183cc6.zip |
user-util: add UID_NOBODY defines that resolve to (uid_t) 65534
We use it all over the place, let's add a #define for it. Makes things
easier greppable, and more explanatory I think.
Diffstat (limited to 'src/basic')
-rw-r--r-- | src/basic/user-util.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/basic/user-util.h b/src/basic/user-util.h index d148d5819e..79adf91ee9 100644 --- a/src/basic/user-util.h +++ b/src/basic/user-util.h @@ -60,6 +60,9 @@ int take_etc_passwd_lock(const char *root); #define UID_INVALID ((uid_t) -1) #define GID_INVALID ((gid_t) -1) +#define UID_NOBODY ((uid_t) 65534U) +#define GID_NOBODY ((gid_t) 65534U) + static inline bool uid_is_dynamic(uid_t uid) { return DYNAMIC_UID_MIN <= uid && uid <= DYNAMIC_UID_MAX; } |