From: Steve Grubb <sgrubb@redhat.com>
To: Rakesh <raksac@yahoo.com>
Cc: "linux-audit@redhat.com" <linux-audit@redhat.com>
Subject: Re: audit watch rules and docker containers
Date: Sun, 4 Mar 2018 14:00:43 +0100 [thread overview]
Message-ID: <20180304140043.718c3a58@ivy-bridge> (raw)
In-Reply-To: <1702143807.8978259.1520067124126@mail.yahoo.com>
On Sat, 3 Mar 2018 08:52:04 +0000 (UTC)
Rakesh <raksac@yahoo.com> wrote:
> Hello Auditd'ers,
>
>
>
> I am running a privileged container with pid, net, uts space shared
> with the host. The need is to be able to set file watch rules from
> the container say -k /etc -p rw -k containter_rule and then look for
> read/write access to files/directories in /var/log/audit/*.
Container support is just now being implemented.
https://www.redhat.com/archives/linux-audit/2018-March/msg00004.html
So, there is no good way right now to make this work like you would
expect it.
-Steve
> What I am
> finding is there are no watch events being logged If I set the same
> audit watch rule from the host (and not being in the privileged
> container) I am able to get audit events Using nsenter to switch
> namespace (nsenter -t 1 auditctl -k /etc -p rw -k containter_rule)
> does not help either I suspect the mnt namespace is different which
> is causing this oddity in behavior looking at container process
> namespace - test@ubuntu-16:~/audit$ sudo ls
> -latr /proc/26050/ns[sudo] password for test:total 0dr-xr-xr-x 9
> root root 0 Mar 2 16:58 ..dr-x--x--x 2 root root 0 Mar 2
> 17:46 .lrwxrwxrwx 1 root root 0 Mar 2 17:46 uts ->
> uts:[4026531838]lrwxrwxrwx 1 root root 0 Mar 2 17:46 user ->
> user:[4026531837]lrwxrwxrwx 1 root root 0 Mar 2 17:46 pid ->
> pid:[4026531836]lrwxrwxrwx 1 root root 0 Mar 2 17:46 net ->
> net:[4026531957]lrwxrwxrwx 1 root root 0 Mar 2 17:46 mnt ->
> mnt:[4026532517]lrwxrwxrwx 1 root root 0 Mar 2 17:46 ipc ->
> ipc:[4026532518]lrwxrwxrwx 1 root root 0 Mar 2 17:46 cgroup ->
> cgroup:[4026531835] looking at init process namespace -
>
> test@ubuntu-16:~/audit$ sudo ls -latr /proc/1/nstotal 0dr-xr-xr-x 9
> root root 0 Mar 2 10:37 ..lrwxrwxrwx 1 root root 0 Mar 2 10:38 mnt
> -> mnt:[4026531840]dr-x--x--x 2 root root 0 Mar 2 10:38 .lrwxrwxrwx
> 1 root root 0 Mar 2 16:47 uts -> uts:[4026531838]lrwxrwxrwx 1 root
> root 0 Mar 2 16:47 user -> user:[4026531837]lrwxrwxrwx 1 root root 0
> Mar 2 16:47 pid -> pid:[4026531836]lrwxrwxrwx 1 root root 0 Mar 2
> 16:47 net -> net:[4026531957]lrwxrwxrwx 1 root root 0 Mar 2 16:47
> ipc -> ipc:[4026531839]lrwxrwxrwx 1 root root 0 Mar 2 16:47 cgroup
> -> cgroup:[4026531835] Can someone please suggest with some thoughts
> on how to make this work. Thanks,Rakesh
--
Linux-audit mailing list
Linux-audit@redhat.com
https://www.redhat.com/mailman/listinfo/linux-audit
next parent reply other threads:[~2018-03-04 13:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <2039210969.8919376.1520042001277.ref@mail.yahoo.com>
[not found] ` <2039210969.8919376.1520042001277@mail.yahoo.com>
[not found] ` <1702143807.8978259.1520067124126@mail.yahoo.com>
2018-03-04 13:00 ` Steve Grubb [this message]
[not found] ` <1356488798.9756685.1520219204924@mail.yahoo.com>
2018-03-05 22:53 ` audit watch rules and docker containers Steve Grubb
2018-03-05 7:09 ` Richard Guy Briggs
[not found] ` <1781337126.10358091.1520285973596@mail.yahoo.com>
2018-03-07 8:57 ` Richard Guy Briggs
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=20180304140043.718c3a58@ivy-bridge \
--to=sgrubb@redhat.com \
--cc=linux-audit@redhat.com \
--cc=raksac@yahoo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox