Skip to content

security/smack implement logging V3

Etienne Basset linux-audit 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 7 repliesIn review

Changes since V2 from the cover letter

- don't make Smack depend on AUDIT
I tried to make it zero overhead in the !CONFIG_AUDIT case, without making the code too ugly (??). I hope i didn't mess it too much
- makes everything a key=value pair
- various other cleanup suggested by Eric and Casey

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2security/smack implement logging V3include/linux/lsm_audit.h security/lsm_audit.c+497 -03 replies
2/2security/smack implement logging V3Documentation/Smack.txt security/Makefile security/smack/smack.h +3 more+618 -1123 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchCasey SchauflerEric Paris
1/2A-b A-b
2/2A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] security/smack implement logging V3

Hello,

the following 2 patches implements auditing of security events for Smack.

patch 1 : created common LSM auditing code
patch 2 : convert smack to use it

Changes since V2 :
- don't make Smack depend on AUDIT
I tried to make it zero overhead in the !CONFIG_AUDIT case, without making the code too ugly (??). I hope i didn't mess it too much
- makes everything a key=value pair
- various other cleanup suggested by Eric and Casey

Change since V1 :
moves shareable code to include/linux/lsm_audit.h and security/lsm_audit.c. Smack specific logging functions are now defined in smack_access.c

sample logs produced :
type=1400 audit(1239127887.607:13): lsm=SMACK fn=smack_sb_mount action=denied subject="FOO" object="_" requested=w pid=6693 comm="mount" path="/debug" dev=sda5 ino=16161 type=1400 audit(1239127890.267:14): lsm=SMACK fn=smack_ptrace_may_access action=denied subject="FOO" object="_" requested=rw pid=6696 comm="ps" pid=6380 comm="bash" type=1400 audit(1239127895.051:20): lsm=SMACK fn=smack_task_kill action=denied subject="FOO" object="_" requested=w pid=6646 comm="bash" pid=6606 comm="thunderbird-bin" type=1400 audit(1239127908.555:21): lsm=SMACK fn=smack_inode_getattr action=denied subject="FOO" object="etienne" requested=r pid=6646 comm="bash" path="/home/etienne/Desktop" dev=sda8 ino=1237000 type=1400 audit(1239127909.223:22): lsm=SMACK fn=smack_inode_permission action=denied subject="FOO" object="_" requested=wx pid=6699 comm="rm" name="etienne" dev=sda8 ino=1236993 type=1400 audit(1239128125.263:24): lsm=SMACK fn=smack_netlabel_send action=denied subject="FOO" object="BAR" requested=w pid=6757 comm="telnet" daddr=212.180.1.1 dest=80