summaryrefslogtreecommitdiff
path: root/src/tmpfiles/tmpfiles.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-11-28 20:51:01 +0100
committerLennart Poettering <lennart@poettering.net>2014-11-28 20:55:04 +0100
commitfed1e721fd0c81e60c77120539f34e16c2585634 (patch)
treea0bb21b49530bc896dcd2c540a582e324c6d7785 /src/tmpfiles/tmpfiles.c
parent36afca67b67984520c5c9a6ce14af51a68c7c8cf (diff)
treewide: introduce UID_INVALID (and friends) as macro for (uid_t) -1
Diffstat (limited to 'src/tmpfiles/tmpfiles.c')
-rw-r--r--src/tmpfiles/tmpfiles.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index f19fa970cf..d60c57793b 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -477,8 +477,8 @@ static int item_set_perms(Item *i, const char *path) {
if ((!st_valid || (i->uid != st.st_uid || i->gid != st.st_gid)) &&
(i->uid_set || i->gid_set))
if (chown(path,
- i->uid_set ? i->uid : (uid_t) -1,
- i->gid_set ? i->gid : (gid_t) -1) < 0) {
+ i->uid_set ? i->uid : UID_INVALID,
+ i->gid_set ? i->gid : GID_INVALID) < 0) {
log_error_errno(errno, "chown(%s) failed: %m", path);
return -errno;