summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-11-07 16:34:37 +0100
committerLennart Poettering <lennart@poettering.net>2014-11-07 16:36:14 +0100
commitf06863bde5de49a503cb8028e89d4b30790f2cbf (patch)
treea489219e8d505d2d737f2098a1d0076aa75eed77 /src
parent144b3d9e093dd9310cd9590bec039dc43a7e2ad6 (diff)
sysusers: be nice and print a warning if futimens() fails
CID# 1251163
Diffstat (limited to 'src')
-rw-r--r--src/sysusers/sysusers.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sysusers/sysusers.c b/src/sysusers/sysusers.c
index c133dc5f10..5f5b49dc77 100644
--- a/src/sysusers/sysusers.c
+++ b/src/sysusers/sysusers.c
@@ -241,7 +241,8 @@ static int make_backup(const char *target, const char *x) {
ts[0] = st.st_atim;
ts[1] = st.st_mtim;
- futimens(fileno(dst), ts);
+ if (futimens(fileno(dst), ts) < 0)
+ log_warning("Failed to fix access and modification time of %s: %m", backup);
if (rename(temp, backup) < 0)
goto fail;