netfilter: xt_owner: Add supplementary groups option
authorLukasz Pawelczyk <l.pawelczyk@samsung.com>
Fri, 10 May 2019 11:46:22 +0000 (13:46 +0200)
committerJunghoon Kim <jhoon20.kim@samsung.com>
Thu, 2 Apr 2020 04:09:07 +0000 (13:09 +0900)
commit08c94f0fcc0934ddefd539fe78a0070e50e49d87
tree4a35283fff8ff52517c75dac314835897bc68cbb
parent171ebddf3ca50a12b0d6b73615843e58d3666826
netfilter: xt_owner: Add supplementary groups option

The XT_OWNER_SUPPL_GROUPS flag causes GIDs specified with XT_OWNER_GID
to be also checked in the supplementary groups of a process.

f_cred->group_info cannot be modified during its lifetime and f_cred
holds a reference to it so it's safe to use.

Signed-off-by: Lukasz Pawelczyk <l.pawelczyk@samsung.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
[sw0312.kim: backport from mainline to apply supplementary groups on netfilter]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I7a21fc112cde77ae708b84d4b48c8aee339a7642
include/uapi/linux/netfilter/xt_owner.h
net/netfilter/xt_owner.c