- log_info("System clock time unset or jumed backwards, restoring.");
-
- if (clock_settime(CLOCK_REALTIME, timespec_store(&ts, nt)) < 0)
- log_error("Failed to restore system clock: %m");
- }
-
- /* Try to fix the access mode, so that we can still
- touch the file after dropping priviliges */
- fchmod(fd, 0644);
- fchown(fd, uid, gid);
-
- return 0;
-}
-
-static int save_clock(void) {
-
- static const struct timespec ts[2] = {
- { .tv_sec = 0, .tv_nsec = UTIME_NOW },
- { .tv_sec = 0, .tv_nsec = UTIME_NOW },
- };