resolved: apply epoch to system time from PID 1
authorLennart Poettering <lennart@poettering.net>
Wed, 3 Feb 2016 17:28:40 +0000 (18:28 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 3 Feb 2016 22:58:24 +0000 (23:58 +0100)
commit021dd87bc055a5bfb2dcef83fc868fe24648b959
treedfdeb912fd2f4b8153fecf7a84060395480312ca
parent5f932eb9af7a5e4723855bcd776c2acaa2a31932
resolved: apply epoch to system time from PID 1

For use in timesyncd we already defined a compile-time "epoch" value, which is based on the mtime of the NEWS file, and
specifies a point in time we know lies in the past at runtime. timesyncd uses this to filter out nonsensical timestamp
file data, and bump the system clock to a time that is after the build time of systemd. This patch adds similar bumping
code to earliest PID 1 initialization, so that the system never continues operation with a clock that is in the 1970ies
or even 1930s.
src/basic/clock-util.c
src/basic/clock-util.h
src/core/main.c