netfilter: xt_qtaguid: add uid permission checks during ctrl/stats access
authorJP Abgrall <jpa@google.com>
Sun, 17 Jul 2011 23:07:23 +0000 (16:07 -0700)
committerJP Abgrall <jpa@google.com>
Fri, 22 Jul 2011 01:04:46 +0000 (18:04 -0700)
commit0b893f0f37736c1e26655f04d51706dfba417171
tree05cb4754030b59b9ed6a72843b830098ae8f056c
parentc477e60b6689d36121f7cabaea449c4014705078
netfilter: xt_qtaguid: add uid permission checks during ctrl/stats access

* uid handling
 - Limit UID impersonation to processes with a gid in AID_NET_BW_ACCT.
   This affects socket tagging, and data removal.
 - Limit stats lookup to own uid or the process gid is in AID_NET_BW_STATS.
   This affects stats lookup.

* allow pacifying the module
  Setting passive to Y/y will make the module return immediately on
  external stimulus.
  No more stats and silent success on ctrl writes.
  Mainly used when one suspects this module of misbehaving.

Change-Id: I83990862d52a9b0922aca103a0f61375cddeb7c4
Signed-off-by: JP Abgrall <jpa@google.com>
include/linux/android_aid.h
net/netfilter/xt_qtaguid.c