All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Guy Briggs <rgb@redhat.com>
To: "Damian Tykałowski" <d47zm3@gmail.com>
Cc: linux-audit@redhat.com
Subject: Re: Problem with watching power commands - key is not logged
Date: Sun, 29 Jan 2017 16:40:36 -0500	[thread overview]
Message-ID: <20170129214036.GD7067@madcap2.tricolour.ca> (raw)
In-Reply-To: <00bd01d27960$5598e330$00caa990$@gmail.com>

On 2017-01-28 13:16, Damian Tykałowski wrote:
> Hi

Hi Damian,

> I'm struggling to get proper auditing of usage of power commands, here's
> what I've got in rules
> 
> [root@host01 ~]# cat /etc/audit/audit.rules | grep power
> -w /sbin/shutdown -p rwx -k power
> -w /sbin/poweroff -p rwx -k power
> -w /sbin/reboot -p rwx -k power
> -w /sbin/halt -p rwx -k power
> -w shutdown -p rwx -k power
> -w poweroff -p rwx -k power
> -w reboot -p rwx -k power
> -w halt -p rwx -k power
> 
> However despite full host reboot/refreshing rules I'm not getting events
> with proper key "power"
> 
> [root@host01 ~]# cat /var/log/audit/audit.log | grep power
> <empty>
> 
> Events are logged though but without key
> 
> type=USER_CMD msg=audit(1485604576.755:679): pid=3490 uid=5004 auid=5004
> ses=1 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
> msg='cwd="/home/user01" cmd="reboot" terminal=pts/0 res=success'
> 
> type=USER_CMD msg=audit(1485604729.923:658): pid=3428 uid=5004 auid=5004
> ses=1 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
> msg='cwd="/home/user01" cmd="reboot" terminal=pts/0 res=success'
> 
> Any idea what is wrong? Rules with other keys seems to work.

I suspect you have another rule that is catching it first?


- RGB

--
Richard Guy Briggs <rgb@redhat.com>
Kernel Security Engineering, Base Operating Systems, Red Hat
Remote, Ottawa, Canada
Voice: +1.647.777.2635, Internal: (81) 32635

--
Linux-audit mailing list
Linux-audit@redhat.com
https://www.redhat.com/mailman/listinfo/linux-audit

  reply	other threads:[~2017-01-29 21:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-28 12:16 Problem with watching power commands - key is not logged Damian Tykałowski
2017-01-29 21:40 ` Richard Guy Briggs [this message]
2017-01-30  9:31   ` Damian Tykałowski
2017-01-30 16:32     ` Stephen Buchanan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170129214036.GD7067@madcap2.tricolour.ca \
    --to=rgb@redhat.com \
    --cc=d47zm3@gmail.com \
    --cc=linux-audit@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.