All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ipt_recent: add module parameter for changing GID of /proc/net/ipt_recent/*
@ 2006-07-08  1:46 Daniel De Graaf
  2006-07-08  3:02 ` Patrick McHardy
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel De Graaf @ 2006-07-08  1:46 UTC (permalink / raw)
  To: Netfilter-Devel

[-- Attachment #1: Type: text/plain, Size: 590 bytes --]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This patch adds an ip_list_gid module parameter to ipt_recent, which is
meant to be used in combination with the ip_list_perms. In the current
implementation, the files must either be world-writable or require
programs which write to them to be (at least) setgid root.

- - Daniel De Graaf
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFErw5+Zz9quLVV3/MRAm89AKCLV3Q3GRXCd0g8NYd0mEbsQMKEhgCdF68k
CdOSO/Sg0iHlKM6xVuXOIqg=
=sOWs
-----END PGP SIGNATURE-----


[-- Attachment #2: ipt_recent.patch --]
[-- Type: text/x-patch, Size: 1333 bytes --]

--- base-2.6.17/net/ipv4/netfilter/ipt_recent.c	2006-06-19 18:47:51.000000000 -0500
+++ linux/net/ipv4/netfilter/ipt_recent.c	2006-07-07 19:20:10.000000000 -0500
@@ -28,6 +28,7 @@
 static unsigned int ip_pkt_list_tot = 20;
 static unsigned int ip_list_hash_size = 0;
 static unsigned int ip_list_perms = 0644;
+static unsigned int ip_list_gid = 0;
 #ifdef DEBUG
 static int debug = 1;
 #endif
@@ -42,6 +43,7 @@
 module_param(ip_pkt_list_tot, uint, 0400);
 module_param(ip_list_hash_size, uint, 0400);
 module_param(ip_list_perms, uint, 0400);
+module_param(ip_list_gid, uint, 0400);
 #ifdef DEBUG
 module_param(debug, bool, 0600);
 MODULE_PARM_DESC(debug,"enable debugging output");
@@ -50,6 +52,7 @@
 MODULE_PARM_DESC(ip_pkt_list_tot,"number of packets per IP to remember");
 MODULE_PARM_DESC(ip_list_hash_size,"size of hash table used to look up IPs");
 MODULE_PARM_DESC(ip_list_perms,"permissions on /proc/net/ipt_recent/* files");
+MODULE_PARM_DESC(ip_list_gid,"owning group of /proc/net/ipt_recent/* files");
 
 /* Structure of our list of recently seen addresses. */
 struct recent_ip_list {
@@ -852,6 +855,7 @@
 	}
 	
 	curr_table->status_proc->owner = THIS_MODULE;
+	curr_table->status_proc->gid = ip_list_gid;
 	curr_table->status_proc->data = curr_table;
 	wmb();
 	curr_table->status_proc->read_proc = ip_recent_get_info;

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-07-09  3:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-08  1:46 [PATCH] ipt_recent: add module parameter for changing GID of /proc/net/ipt_recent/* Daniel De Graaf
2006-07-08  3:02 ` Patrick McHardy
2006-07-08  3:25   ` Daniel De Graaf
2006-07-08 10:42     ` Patrick McHardy
2006-07-08 17:21       ` Daniel De Graaf
2006-07-09  3:43         ` Patrick McHardy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.