]> Pileus Git - ~andy/linux/commit
lsm: Use a compressed IPv6 string format in audit events
authorPaul Moore <paul.moore@hp.com>
Wed, 23 Sep 2009 17:46:00 +0000 (13:46 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 24 Sep 2009 07:50:26 +0000 (03:50 -0400)
commitd81165919ebf6e1cb9eeb612150f9287ad414659
tree25b205e22ec1182e6a92f77381b58a5b09972f7f
parent939cbf260c1abce6cad4b95ea4ba9f5132b660b3
lsm: Use a compressed IPv6 string format in audit events

Currently the audit subsystem prints uncompressed IPv6 addresses which not
only differs from common usage but also results in ridiculously large audit
strings which is not a good thing.  This patch fixes this by simply converting
audit to always print compressed IPv6 addresses.

Old message example:

 audit(1253576792.161:30): avc:  denied  { ingress } for
  saddr=0000:0000:0000:0000:0000:0000:0000:0001 src=5000
  daddr=0000:0000:0000:0000:0000:0000:0000:0001 dest=35502 netif=lo
  scontext=system_u:object_r:unlabeled_t:s15:c0.c1023
  tcontext=system_u:object_r:lo_netif_t:s0-s15:c0.c1023 tclass=netif

New message example:

 audit(1253576792.161:30): avc:  denied  { ingress } for
  saddr=::1 src=5000 daddr=::1 dest=35502 netif=lo
  scontext=system_u:object_r:unlabeled_t:s15:c0.c1023
  tcontext=system_u:object_r:lo_netif_t:s0-s15:c0.c1023 tclass=netif

Signed-off-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
security/lsm_audit.c