summaryrefslogtreecommitdiffstats
path: root/extensions/libxt_owner.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2010-01-31 22:42:52 +0100
committerJan Engelhardt <jengelh@medozas.de>2010-02-01 01:17:29 +0100
commit350661a6eb089f3e54e67e022db9e16ea280499f (patch)
treee6857b58f535bab42e2381f7fbb027f4cc9aa63a /extensions/libxt_owner.c
parent028ad9ec6d5c27c107c9a7a316617cbe366abb0f (diff)
includes: header updates
Update the shipped Linux kernel headers from 2.6.33-rc6, as iptables's ipt_ECN.h for example references ipt_DSCP.h, which no longer exists. Since a number of old code pieces have been removed in the kernel in that fashion, the structs for older versions are moved into the .c file, to keep header updating simple. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'extensions/libxt_owner.c')
-rw-r--r--extensions/libxt_owner.c34
1 files changed, 32 insertions, 2 deletions
diff --git a/extensions/libxt_owner.c b/extensions/libxt_owner.c
index 25441384..b595d972 100644
--- a/extensions/libxt_owner.c
+++ b/extensions/libxt_owner.c
@@ -16,8 +16,38 @@
#include <xtables.h>
#include <linux/netfilter/xt_owner.h>
-#include <linux/netfilter_ipv4/ipt_owner.h>
-#include <linux/netfilter_ipv6/ip6t_owner.h>
+
+/* match and invert flags */
+enum {
+ IPT_OWNER_UID = 0x01,
+ IPT_OWNER_GID = 0x02,
+ IPT_OWNER_PID = 0x04,
+ IPT_OWNER_SID = 0x08,
+ IPT_OWNER_COMM = 0x10,
+ IP6T_OWNER_UID = IPT_OWNER_UID,
+ IP6T_OWNER_GID = IPT_OWNER_GID,
+ IP6T_OWNER_PID = IPT_OWNER_PID,
+ IP6T_OWNER_SID = IPT_OWNER_SID,
+ IP6T_OWNER_COMM = IPT_OWNER_COMM,
+};
+
+struct ipt_owner_info {
+ uid_t uid;
+ gid_t gid;
+ pid_t pid;
+ pid_t sid;
+ char comm[16];
+ u_int8_t match, invert; /* flags */
+};
+
+struct ip6t_owner_info {
+ uid_t uid;
+ gid_t gid;
+ pid_t pid;
+ pid_t sid;
+ char comm[16];
+ u_int8_t match, invert; /* flags */
+};
/*
* Note: "UINT32_MAX - 1" is used in the code because -1 is a reserved