[PATCH ghak10 v5 2/2] timekeeping/ntp: Audit clock/NTP params adjustments

2018-08-24 Thread Ondrej Mosnacek
This patch adds logging of all attempts to either inject an offset into the clock (producing an AUDIT_TIME_INJOFFSET record) or adjust an NTP parameter (producing an AUDIT_TIME_ADJNTPVAL record). For reference, running the following commands: auditctl -D auditctl -a exit,always -F arch=b6

[PATCH ghak10 v5 0/2] audit: Log modifying adjtimex(2) calls

2018-08-24 Thread Ondrej Mosnacek
This patchset implements more detailed auditing of the adjtimex(2) syscall in order to make it possible to: a) distinguish modifying vs. read-only calls in the audit log b) reconstruct from the audit log what changes were made and how they have influenced the system clock The main motivat

[PATCH ghak10 v5 1/2] audit: Add functions to log time adjustments

2018-08-24 Thread Ondrej Mosnacek
This patch adds two auxiliary record types that will be used to annotate the adjtimex SYSCALL records with the NTP/timekeeping values that have been changed. Next, it adds two functions to the audit interface: - audit_tk_injoffset(), which will be called whenever a timekeeping offset is inject

Re: [PATCH ghak95] audit: Do not log full CWD path on empty relative paths

2018-08-24 Thread Ondrej Mosnacek
On Thu, Aug 2, 2018 at 1:45 PM Ondrej Mosnacek wrote: > When a relative path has just a single component and we want to emit a > nametype=PARENT record, the current implementation just reports the full > CWD path (which is alrady available in the audit context). > > This is wrong for three reasons

Re: [PATCH ghak95] audit: Do not log full CWD path on empty relative paths

2018-08-24 Thread Paul Moore
On Fri, Aug 3, 2018 at 3:08 AM Ondrej Mosnacek wrote: > On Fri, Aug 3, 2018 at 12:24 AM Paul Moore wrote: > > On Thu, Aug 2, 2018 at 7:45 AM Ondrej Mosnacek wrote: > > > > > > When a relative path has just a single component and we want to emit a > > > nametype=PARENT record, the current impleme

Re: [PATCH ghak95] audit: Do not log full CWD path on empty relative paths

2018-08-24 Thread Steve Grubb
On Friday, August 24, 2018 8:59:10 AM EDT Ondrej Mosnacek wrote: > On Thu, Aug 2, 2018 at 1:45 PM Ondrej Mosnacek wrote: > > When a relative path has just a single component and we want to emit a > > nametype=PARENT record, the current implementation just reports the full > > CWD path (which is al

Re: [RFC PATCH ghak10 v4 0/2] audit: Log modifying adjtimex(2) calls

2018-08-24 Thread Steve Grubb
On Wednesday, August 22, 2018 5:27:17 PM EDT Paul Moore wrote: > On Tue, Aug 21, 2018 at 3:21 AM Miroslav Lichvar wrote: > > > On Mon, 20 Aug 2018, Ondrej Mosnacek wrote: > > > > @John or other timekeeping/NTP folks: We had a discussion on the > > > > audit > > > > ML on which of the internal tim

Re: [PATCH ghak95] audit: Do not log full CWD path on empty relative paths

2018-08-24 Thread Paul Moore
On Thu, Aug 2, 2018 at 8:03 PM Paul Moore wrote: > > On Thu, Aug 2, 2018 at 7:45 AM Ondrej Mosnacek wrote: > > When a relative path has just a single component and we want to emit a > > nametype=PARENT record, the current implementation just reports the full > > CWD path (which is alrady availabl

Re: [PATCH ghak95] audit: Do not log full CWD path on empty relative paths

2018-08-24 Thread Steve Grubb
On Friday, August 24, 2018 11:00:35 AM EDT Paul Moore wrote: > On Thu, Aug 2, 2018 at 8:03 PM Paul Moore wrote: > > On Thu, Aug 2, 2018 at 7:45 AM Ondrej Mosnacek wrote: > > > When a relative path has just a single component and we want to emit a > > > nametype=PARENT record, the current impleme

Re: [PATCH ghak90 (was ghak32) V4 02/10] audit: add container id

2018-08-24 Thread Steve Grubb
On Tuesday, July 31, 2018 4:07:37 PM EDT Richard Guy Briggs wrote: > Implement the proc fs write to set the audit container identifier of a > process, emitting an AUDIT_CONTAINER_OP record to document the event. > > This is a write from the container orchestrator task to a proc entry of > the form

Re: [PATCH ghak90 (was ghak32) V4 03/10] audit: log container info of syscalls

2018-08-24 Thread Steve Grubb
On Tuesday, July 31, 2018 4:07:38 PM EDT Richard Guy Briggs wrote: > Create a new audit record AUDIT_CONTAINER to document the audit > container identifier of a process if it is present. > > Called from audit_log_exit(), syscalls are covered. > > A sample raw event: > type=SYSCALL msg=audit(15199

Re: [PATCH ghak10 v5 1/2] audit: Add functions to log time adjustments

2018-08-24 Thread John Stultz
On Fri, Aug 24, 2018 at 5:00 AM, Ondrej Mosnacek wrote: > This patch adds two auxiliary record types that will be used to annotate > the adjtimex SYSCALL records with the NTP/timekeeping values that have > been changed. > > Next, it adds two functions to the audit interface: > - audit_tk_injoffse

Re: [PATCH ghak10 v5 2/2] timekeeping/ntp: Audit clock/NTP params adjustments

2018-08-24 Thread Richard Guy Briggs
On 2018-08-24 14:00, Ondrej Mosnacek wrote: > This patch adds logging of all attempts to either inject an offset into > the clock (producing an AUDIT_TIME_INJOFFSET record) or adjust an NTP > parameter (producing an AUDIT_TIME_ADJNTPVAL record). I thought I saw it suggested earlier in one of the r