From 45d591cf22796e972741f920ba1778d5e1abcdf8 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 31 Jan 2008 04:06:38 -0800 Subject: [PATCH] --- yaml --- r: 81903 b: refs/heads/master c: edc26f7aaa23591c779d6d6fc833c0c96fbeb3c0 h: refs/heads/master i: 81901: 04e64d85250b6ccb8b976a256662e089f41134cd 81899: 78621cb3bdc19e5dbe65c7fd9983ae04409d3e50 81895: 144d987585cb347d9ff5ad557afb9e55bebeaf4a 81887: e6d1192a06586121f4567a808769dbf707388487 v: v3 --- [refs] | 2 +- trunk/include/linux/netfilter/xt_owner.h | 4 ++-- trunk/net/netfilter/xt_owner.c | 14 ++++++++------ 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index 66615f4ef7b9..97cb58399dd9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 37c08387fc31a0fe7a570664c93be4f1c1bc0c94 +refs/heads/master: edc26f7aaa23591c779d6d6fc833c0c96fbeb3c0 diff --git a/trunk/include/linux/netfilter/xt_owner.h b/trunk/include/linux/netfilter/xt_owner.h index eacd34efebd5..c84e52cfe415 100644 --- a/trunk/include/linux/netfilter/xt_owner.h +++ b/trunk/include/linux/netfilter/xt_owner.h @@ -8,8 +8,8 @@ enum { }; struct xt_owner_match_info { - u_int32_t uid; - u_int32_t gid; + u_int32_t uid_min, uid_max; + u_int32_t gid_min, gid_max; u_int8_t match, invert; }; diff --git a/trunk/net/netfilter/xt_owner.c b/trunk/net/netfilter/xt_owner.c index d382f9cc38b0..9059c16144c3 100644 --- a/trunk/net/netfilter/xt_owner.c +++ b/trunk/net/netfilter/xt_owner.c @@ -4,8 +4,8 @@ * * (C) 2000 Marc Boucher * - * Copyright © CC Computer Consultants GmbH, 2007 - * Contact: + * Copyright © CC Computer Consultants GmbH, 2007 - 2008 + * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -102,13 +102,15 @@ owner_mt(const struct sk_buff *skb, const struct net_device *in, (XT_OWNER_UID | XT_OWNER_GID)) == 0; if (info->match & XT_OWNER_UID) - if ((filp->f_uid != info->uid) ^ - !!(info->invert & XT_OWNER_UID)) + if ((filp->f_uid >= info->uid_min && + filp->f_uid <= info->uid_max) ^ + !(info->invert & XT_OWNER_UID)) return false; if (info->match & XT_OWNER_GID) - if ((filp->f_gid != info->gid) ^ - !!(info->invert & XT_OWNER_GID)) + if ((filp->f_gid >= info->gid_min && + filp->f_gid <= info->gid_max) ^ + !(info->invert & XT_OWNER_GID)) return false; return true;