aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel De Graaf <danield@iastate.edu>2006-08-22 03:30:55 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-09-22 17:55:23 -0400
commitb93ff78317c0b8f42830e2bb13dd8df596232528 (patch)
tree1a37f733e793463c196f31aebe03e2b5058c991f
parenta468701db58a8b3e08e3f55fa6ac66db42014922 (diff)
[NETFILTER]: ipt_recent: add module parameter for changing ownership of /proc/net/ipt_recent/*
Signed-off-by: Daniel De Graaf <danield@iastate.edu> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ipv4/netfilter/ipt_recent.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/ipv4/netfilter/ipt_recent.c b/net/ipv4/netfilter/ipt_recent.c
index 61a2139f9cfd..682c0946201e 100644
--- a/net/ipv4/netfilter/ipt_recent.c
+++ b/net/ipv4/netfilter/ipt_recent.c
@@ -35,14 +35,20 @@ static unsigned int ip_list_tot = 100;
35static unsigned int ip_pkt_list_tot = 20; 35static unsigned int ip_pkt_list_tot = 20;
36static unsigned int ip_list_hash_size = 0; 36static unsigned int ip_list_hash_size = 0;
37static unsigned int ip_list_perms = 0644; 37static unsigned int ip_list_perms = 0644;
38static unsigned int ip_list_uid = 0;
39static unsigned int ip_list_gid = 0;
38module_param(ip_list_tot, uint, 0400); 40module_param(ip_list_tot, uint, 0400);
39module_param(ip_pkt_list_tot, uint, 0400); 41module_param(ip_pkt_list_tot, uint, 0400);
40module_param(ip_list_hash_size, uint, 0400); 42module_param(ip_list_hash_size, uint, 0400);
41module_param(ip_list_perms, uint, 0400); 43module_param(ip_list_perms, uint, 0400);
44module_param(ip_list_uid, uint, 0400);
45module_param(ip_list_gid, uint, 0400);
42MODULE_PARM_DESC(ip_list_tot, "number of IPs to remember per list"); 46MODULE_PARM_DESC(ip_list_tot, "number of IPs to remember per list");
43MODULE_PARM_DESC(ip_pkt_list_tot, "number of packets per IP to remember (max. 255)"); 47MODULE_PARM_DESC(ip_pkt_list_tot, "number of packets per IP to remember (max. 255)");
44MODULE_PARM_DESC(ip_list_hash_size, "size of hash table used to look up IPs"); 48MODULE_PARM_DESC(ip_list_hash_size, "size of hash table used to look up IPs");
45MODULE_PARM_DESC(ip_list_perms, "permissions on /proc/net/ipt_recent/* files"); 49MODULE_PARM_DESC(ip_list_perms, "permissions on /proc/net/ipt_recent/* files");
50MODULE_PARM_DESC(ip_list_uid,"owner of /proc/net/ipt_recent/* files");
51MODULE_PARM_DESC(ip_list_gid,"owning group of /proc/net/ipt_recent/* files");
46 52
47 53
48struct recent_entry { 54struct recent_entry {
@@ -274,6 +280,8 @@ ipt_recent_checkentry(const char *tablename, const void *ip,
274 goto out; 280 goto out;
275 } 281 }
276 t->proc->proc_fops = &recent_fops; 282 t->proc->proc_fops = &recent_fops;
283 t->proc->uid = ip_list_uid;
284 t->proc->gid = ip_list_gid;
277 t->proc->data = t; 285 t->proc->data = t;
278#endif 286#endif
279 spin_lock_bh(&recent_lock); 287 spin_lock_bh(&recent_lock);