]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
timesync: do not fail when started as privileged user
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 16 Jan 2018 18:34:45 +0000 (03:34 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 16 Jan 2018 18:34:45 +0000 (03:34 +0900)
src/timesync/timesyncd.c

index acd7ff133a36ff3d4be7c02177bc9d9d20c0f32a..bea800171b847a173ffff7650412c271663b99cd 100644 (file)
@@ -66,6 +66,7 @@ static int load_clock_timestamp(uid_t uid, gid_t gid) {
                         if (r < 0)
                                 return log_error_errno(errno, "Failed to change file access mode: %m");
                         r = fchown(fd, uid, gid);
+                        if (r < 0)
                                 return log_error_errno(errno, "Failed to change file owner: %m");
                 }