X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=net%2Fnetfilter%2Fxt_owner.c;h=9059c16144c3cb1d67fe3d6accc2f6951744e5a7;hb=061964fb988ca51087948975da66ff523b3a5852;hp=d382f9cc38b0b5fbf90c4af50f4c5b5a2c7b2e65;hpb=bd45ac0c5daae35e7c71138172e63df5cf644cf6;p=linux-2.6 diff --git a/net/netfilter/xt_owner.c b/net/netfilter/xt_owner.c index d382f9cc38..9059c16144 100644 --- a/net/netfilter/xt_owner.c +++ b/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;