chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a4a32b7
)
user-util: add UID_NOBODY defines that resolve to (uid_t) 65534
author
Lennart Poettering
<lennart@poettering.net>
Mon, 4 Dec 2017 16:06:56 +0000
(17:06 +0100)
committer
Sven Eden
<yamakuzure@gmx.net>
Mon, 4 Dec 2017 16:06:56 +0000
(17:06 +0100)
We use it all over the place, let's add a #define for it. Makes things
easier greppable, and more explanatory I think.
src/basic/user-util.h
patch
|
blob
|
history
diff --git
a/src/basic/user-util.h
b/src/basic/user-util.h
index d97f4821aebae6f3af7ecc923fc055d107ce0ffd..a61c0bff7494708bcfa473c84a66944aa18d9b5e 100644
(file)
--- a/
src/basic/user-util.h
+++ b/
src/basic/user-util.h
@@
-67,6
+67,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;
}