summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-12-08 10:50:29 +0100
committerLennart Poettering <lennart@poettering.net>2016-12-20 20:00:08 +0100
commit289cb4d5cd7462a074ffb5018efa385e82220318 (patch)
tree82736bac02c9781cf1adb0e529db674f820dea2a /src/shared
parenta4c35b6b4d8457e15caa3fe18ce8050918932d00 (diff)
shared: use uid_is_valid() for checking validity of UIDs
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/base-filesystem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c
index f1fbce9dca..127cbe44e3 100644
--- a/src/shared/base-filesystem.c
+++ b/src/shared/base-filesystem.c
@@ -101,7 +101,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) {
if (r < 0 && errno != EEXIST)
return log_error_errno(errno, "Failed to create symlink at %s/%s: %m", root, table[i].dir);
- if (uid != UID_INVALID || gid != UID_INVALID) {
+ if (uid_is_valid(uid) || gid_is_valid(gid)) {
if (fchownat(fd, table[i].dir, uid, gid, AT_SYMLINK_NOFOLLOW) < 0)
return log_error_errno(errno, "Failed to chown symlink at %s/%s: %m", root, table[i].dir);
}