mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-22 10:07:12 +00:00
Handle symlink
log events in aa-logprof
Nobody told the tools that log events with operation="symlink" exist. Add this keyword to the list of file or network operations (I don't expect network symlinks ;-) but keeping everything in that list makes things easier than special-casing it.) Also add the log sample and expected result to the libapparmor tests. Fixes https://gitlab.com/apparmor/apparmor/-/issues/107
This commit is contained in:
parent
f318def665
commit
98bf187323
1
libraries/libapparmor/testsuite/test_multi/symlink.in
Normal file
1
libraries/libapparmor/testsuite/test_multi/symlink.in
Normal file
@ -0,0 +1 @@
|
||||
Aug 3 00:00:41 liuchao-virtual-machine kernel: [ 4362.615262] audit: type=1400 audit(1596384041.705:290): apparmor="DENIED" operation="symlink" profile="/home/test.sh" name="/home/b.c" pid=8016 comm="ln" requested_mask="c" denied_mask="c" fsuid=0 ouid=0
|
15
libraries/libapparmor/testsuite/test_multi/symlink.out
Normal file
15
libraries/libapparmor/testsuite/test_multi/symlink.out
Normal file
@ -0,0 +1,15 @@
|
||||
START
|
||||
File: symlink.in
|
||||
Event type: AA_RECORD_DENIED
|
||||
Audit ID: 1596384041.705:290
|
||||
Operation: symlink
|
||||
Mask: c
|
||||
Denied Mask: c
|
||||
fsuid: 0
|
||||
ouid: 0
|
||||
Profile: /home/test.sh
|
||||
Name: /home/b.c
|
||||
Command: ln
|
||||
PID: 8016
|
||||
Epoch: 1596384041
|
||||
Audit subid: 290
|
@ -0,0 +1,4 @@
|
||||
/home/test.sh {
|
||||
owner /home/b.c w,
|
||||
|
||||
}
|
@ -319,6 +319,7 @@ class ReadLog:
|
||||
'rename_dest',
|
||||
'unlink',
|
||||
'rmdir',
|
||||
'symlink',
|
||||
'symlink_create',
|
||||
'link',
|
||||
'sysctl',
|
||||
|
Loading…
x
Reference in New Issue
Block a user