chiark / gitweb /
sysusers: be nice and print a warning if futimens() fails
authorLennart Poettering <lennart@poettering.net>
Fri, 7 Nov 2014 15:34:37 +0000 (16:34 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 7 Nov 2014 15:36:14 +0000 (16:36 +0100)
CID# 1251163

src/sysusers/sysusers.c

index c133dc5..5f5b49d 100644 (file)
@@ -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;