Change-Id: Ic83f49e526d564977622f69ff907fb6d928dc161
Signed-off-by: Rahul Dadhich <r.dadhich@samsung.com>
XT_OWNER_SUPPL_GROUPS = 1 << 3,
};
+#define XT_OWNER_MASK (XT_OWNER_UID | \
+ XT_OWNER_GID | \
+ XT_OWNER_SOCKET | \
+ XT_OWNER_SUPPL_GROUPS)
+
struct xt_owner_match_info {
__u32 uid_min, uid_max;
__u32 gid_min, gid_max;
{
struct xt_owner_match_info *info = par->matchinfo;
+ if (info->match & ~XT_OWNER_MASK)
+ return -EINVAL;
+
/* For now only allow adding matches from the initial user namespace */
if ((info->match & (XT_OWNER_UID|XT_OWNER_GID)) &&
(current_user_ns() != &init_user_ns))