linux-audit.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Ondrej Mosnacek <omosnace@redhat.com>
To: Alan Evangelista <alan.vitor@gmail.com>
Cc: Linux-Audit Mailing List <linux-audit@redhat.com>
Subject: Re: renameat2 syscall is not recorded
Date: Wed, 10 Mar 2021 09:06:28 +0100	[thread overview]
Message-ID: <CAFqZXNvZ0nsN9N5WNkMWT1PGtDL9RpiLJZXme3Wihvk9BoAm4A@mail.gmail.com> (raw)
In-Reply-To: <CAKz+TUtWXMPxnoBtpGR5au6qtb7tz3vmjGhtt6xMf-G9t__SPw@mail.gmail.com>

On Tue, Mar 9, 2021 at 7:44 PM Alan Evangelista <alan.vitor@gmail.com> wrote:
> I have the following audit rule:
>
> -a exit,always -F dir=/data -F arch=b64 -S open -S unlink -S unlinkat -S link -S rename
> -S renameat S renameat2 -S chmod

Not sure if this is it, but there is a "-" missing before the "S"
before "renameat2".

> -S fchmod -S fchmodat -S chown -S fchown -S fchownat -S mkdir -S rmdir -S setxattr -S lsetxattr -S fsetxattr -S removexattr -S lremovexattr -S fremovexattr -k filesystem_op
>
> I straced the "mv" command to be sure it's implemented using the renameat2 syscall:
>
> # strace mv /data/test5.txt /data/test6.txt
> execve("/bin/mv", ["mv", "/data/test5.txt", "/data/test6.txt"], 0x7ffdf760a210 /* 23 vars */) = 0
> (...)
> renameat2(AT_FDCWD, "/data/test5.txt", AT_FDCWD, "/data/test6.txt", 0) = 0
> (...)
>
> However, I don't see any events recorded in the auditd log file when I move files using the "mv" command. Am I doing something wrong?
>
>
> Thanks in advance.
> --
> Linux-audit mailing list
> Linux-audit@redhat.com
> https://listman.redhat.com/mailman/listinfo/linux-audit

-- 
Ondrej Mosnacek
Software Engineer, Linux Security - SELinux kernel
Red Hat, Inc.

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


  parent reply	other threads:[~2021-03-10  8:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-09 18:44 renameat2 syscall is not recorded Alan Evangelista
2021-03-10  0:17 ` Paul Moore
2021-03-10  8:06 ` Ondrej Mosnacek [this message]
2021-03-10 10:53   ` Alan Evangelista
2021-03-10 19:06     ` Steve Grubb
2021-03-11 10:31       ` Alan Evangelista

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=CAFqZXNvZ0nsN9N5WNkMWT1PGtDL9RpiLJZXme3Wihvk9BoAm4A@mail.gmail.com \
    --to=omosnace@redhat.com \
    --cc=alan.vitor@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).