]> err.no Git - linux-2.6/blobdiff - net/netfilter/xt_owner.c
mac80211: automatic IBSS channel selection
[linux-2.6] / net / netfilter / xt_owner.c
index 4222fa2c1b14c9c278422d5de97879f22787cba0..9059c16144c3cb1d67fe3d6accc2f6951744e5a7 100644 (file)
@@ -4,8 +4,8 @@
  *
  * (C) 2000 Marc Boucher <marc@mbsi.ca>
  *
- * Copyright © CC Computer Consultants GmbH, 2007
- * Contact: <jengelh@computergmbh.de>
+ * Copyright © CC Computer Consultants GmbH, 2007 - 2008
+ * <jengelh@computergmbh.de>
  *
  * 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;
@@ -205,7 +207,7 @@ static void __exit owner_mt_exit(void)
 module_init(owner_mt_init);
 module_exit(owner_mt_exit);
 MODULE_AUTHOR("Jan Engelhardt <jengelh@computergmbh.de>");
-MODULE_DESCRIPTION("netfilter \"owner\" match module");
+MODULE_DESCRIPTION("Xtables: socket owner matching");
 MODULE_LICENSE("GPL");
 MODULE_ALIAS("ipt_owner");
 MODULE_ALIAS("ip6t_owner");