Ondrej Mosnacek 2d87a0674b timekeeping: Audit clock adjustments
Emit an audit record whenever the system clock is changed (i.e. shifted
by a non-zero offset) by a syscall from userspace. The syscalls than can
(at the time of writing) trigger such record are:
  - settimeofday(2), stime(2), clock_settime(2) -- via
    do_settimeofday64()
  - adjtimex(2), clock_adjtime(2) -- via do_adjtimex()

The new records have type AUDIT_TIME_INJOFFSET and contain the following
fields:
  - sec -- the 'seconds' part of the offset
  - nsec -- the 'nanoseconds' part of the offset

Example record (time was shifted backwards by ~15.875 seconds):

type=TIME_INJOFFSET msg=audit(1530616049.652:13): sec=-16 nsec=124887145

The records of this type will be associated with the corresponding
syscall records.

Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
Reviewed-by: Richard Guy Briggs <rgb@redhat.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
[PM: fixed a line width problem in __audit_tk_injoffset()]
Signed-off-by: Paul Moore <paul@paul-moore.com>
2019-04-15 18:10:17 -04:00
..
2019-03-15 14:22:59 -07:00
2019-04-15 18:10:17 -04:00
2019-03-16 12:36:39 -07:00
2019-04-15 18:10:17 -04:00
2019-02-04 08:57:24 +01:00
2019-03-09 15:53:03 -08:00
2019-02-01 20:55:38 +01:00
2018-12-28 12:42:30 -08:00
2018-10-31 08:54:16 -07:00
2019-03-16 13:05:32 -07:00
2019-03-16 13:47:14 -07:00
2018-07-03 09:20:44 +02:00
2019-03-16 13:47:14 -07:00
2019-01-11 18:05:40 -08:00