policy: make policy checks work across user namespaces
Use the global kuid_t and kgid_t to store uid/gid values, this way we
our policy checks will work across user namespaces.
Note that currently we ignore that the user is privileged in its own
namespaces and the policy access kuid_t and kgid_t were mapped into that
namespace. If this is requested we can add it later a la:
fs/inode.c:inode_owner_or_capable()
Add kdbus_policy_make_access() to convert the user provided info to the
current user namespace. Userspace struct is not changed, only the kernel
one.
This patch fixes test #8 of test-kdbus-policy
Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
[daniel: group kdbus_policy_db_entry_access->{uid,gid} in a union]