public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
* How to define rule for SERVICE_START/STOP?
@ 2014-08-04 19:16 Gisela Cheng
  2014-08-04 20:34 ` Steve Grubb
  0 siblings, 1 reply; 2+ messages in thread
From: Gisela Cheng @ 2014-08-04 19:16 UTC (permalink / raw)
  To: linux-audit


[-- Attachment #1.1: Type: text/plain, Size: 583 bytes --]

 We want to use Linux audit type SERVICE_START/STOP for our application 
running as service.
 But I am not able to find example on how to use auditctl to define the 
rule.  It seems to me that
 all the examples are of rules defined for system_calls.  Questions:
 1.  Can I use audit type SERVICE_START/STOP for my application runs as 
service?  or would it
      be considered as type USR_CMD?
 2.  How do I use auditctl to define rule for SERVICE_START/STOP?  Can you 
direct/point me
      to URL/documentation where it is documented?

 Thanks.

 Gisela Cheng 
 giselac@us.ibm.com

[-- Attachment #1.2: Type: text/html, Size: 1028 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How to define rule for SERVICE_START/STOP?
  2014-08-04 19:16 How to define rule for SERVICE_START/STOP? Gisela Cheng
@ 2014-08-04 20:34 ` Steve Grubb
  0 siblings, 0 replies; 2+ messages in thread
From: Steve Grubb @ 2014-08-04 20:34 UTC (permalink / raw)
  To: linux-audit; +Cc: Gisela Cheng

On Monday, August 04, 2014 03:16:18 PM Gisela Cheng wrote:
>  We want to use Linux audit type SERVICE_START/STOP for our application
> running as service.
>  But I am not able to find example on how to use auditctl to define the
> rule.  It seems to me that all the examples are of rules defined for
> system_calls.

There are 2 kinds of events. Some are hardwired into the applications (or 
kernel) and they send them if auditing is enabled. The other kind are 
discretionary in that the admin defines what to audit. The problem with the 
discretionary rules are that it is from the kernel's point of view. Meaning 
that you only get events as the process transitions through something the 
kernel controls like files or syscalls.


> Questions:
>  1.  Can I use audit type SERVICE_START/STOP for my application runs as
> service?

The SERVICE_START/STOP command are intended to be sent by the init daemon. 
Systemd already sends these. Upstart could be patched, but if that is done it 
would need to match the layout, order, and formatting of the systemd events.

> or would it be considered as type USR_CMD?

USER_CMD is for something like sudo to record what command the user will be 
running.

>  2.  How do I use auditctl to define rule for SERVICE_START/STOP?  Can you
> direct/point me to URL/documentation where it is documented?

It can't define these events because the kernel only sees a process start or 
stop. It has no idea that its a service. Only init can tell the difference.

-Steve

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-04 20:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-04 19:16 How to define rule for SERVICE_START/STOP? Gisela Cheng
2014-08-04 20:34 ` Steve Grubb

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox