linux-audit.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Alan Evangelista <alan.vitor@gmail.com>
To: linux-audit@redhat.com
Subject: renameat2 syscall is not recorded
Date: Tue, 9 Mar 2021 15:44:04 -0300	[thread overview]
Message-ID: <CAKz+TUtWXMPxnoBtpGR5au6qtb7tz3vmjGhtt6xMf-G9t__SPw@mail.gmail.com> (raw)


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

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 -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.

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

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

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

             reply	other threads:[~2021-03-09 18:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-09 18:44 Alan Evangelista [this message]
2021-03-10  0:17 ` renameat2 syscall is not recorded Paul Moore
2021-03-10  8:06 ` Ondrej Mosnacek
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=CAKz+TUtWXMPxnoBtpGR5au6qtb7tz3vmjGhtt6xMf-G9t__SPw@mail.gmail.com \
    --to=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).