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)
committermgross <mark.gross@intel.com>
Wed, 9 Nov 2011 20:21:54 +0000 (12:21 -0800)
commitea886fc56a2d274c21fdd2095bcc12631ae00b07
treea662012081aeeb9ecd07b18c6dac529836e51f13
parentfa9a3979748d9c37b806f8a2ada6ee0ceb9ecd6a
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