Re: Linux Security *Module* Framework

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jan Engelhardt
Date: Sunday, October 28, 2007 - 1:46 pm

On Oct 28 2007 20:42, Tilman Schmidt wrote:

Perfect security from threats that normally deliver via internet!
(And it is even one of these that benefit from being modular!)

#include <linux/kmod.h>
#include <linux/module.h>
#include <linux/netdevice.h>
#include <net/net_namespace.h>

static void cl(const char *name, const char *state)
{
	const char *args[] = {"ip", "link", "set", name, state, NULL};
	call_usermodehelper("/sbin/ip", (char **)args, NULL, UMH_NO_WAIT);
}  

int __init automagic_security_init(void)
{
	const struct net_device *dev;

	for_each_netdev(&init_net, dev)
		cl(dev->name, "down");

	return 0;
}

void __exit automagic_security_exit(void)
{
	const struct net_device *dev;   
 
	for_each_netdev(&init_net, dev)
		cl(dev->name, "up");

        return;
}

module_init(automagic_security_init);
module_exit(automagic_security_exit);
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: LSM conversion to static interface, Linus Torvalds, (Wed Oct 17, 7:18 pm)
Re: LSM conversion to static interface, Andreas Gruenbacher, (Fri Oct 19, 1:26 pm)
Re: LSM conversion to static interface, Linus Torvalds, (Fri Oct 19, 1:40 pm)
Re: LSM conversion to static interface, James Morris, (Fri Oct 19, 2:07 pm)
Re: LSM conversion to static interface, Jan Engelhardt, (Sat Oct 20, 4:05 am)
Re: LSM conversion to static interface, James Morris, (Sat Oct 20, 3:57 pm)
Re: LSM conversion to static interface, Adrian Bunk, (Sun Oct 21, 3:59 pm)
Re: Re: LSM conversion to static interface, Crispin Cowan, (Sun Oct 21, 6:12 pm)
Re: LSM conversion to static interface [revert patch], Arjan van de Ven, (Mon Oct 22, 9:09 pm)
Re: LSM conversion to static interface [revert patch], James Morris, (Mon Oct 22, 9:56 pm)
Re: LSM conversion to static interface [revert patch], Arjan van de Ven, (Mon Oct 22, 9:57 pm)
Re: LSM conversion to static interface [revert patch], Chris Wright, (Mon Oct 22, 10:16 pm)
Re: LSM conversion to static interface, Giacomo Catenazzi, (Mon Oct 22, 10:44 pm)
Re: LSM conversion to static interface, Jan Engelhardt, (Tue Oct 23, 1:55 am)
Re: LSM conversion to static interface [revert patch], Jan Engelhardt, (Tue Oct 23, 2:10 am)
Re: LSM conversion to static interface [revert patch], Chris Wright, (Tue Oct 23, 2:13 am)
Re: LSM conversion to static interface, Jan Engelhardt, (Tue Oct 23, 2:13 am)
Re: LSM conversion to static interface [revert patch], Jan Engelhardt, (Tue Oct 23, 2:14 am)
Re: LSM conversion to static interface, Giacomo A. Catenazzi, (Tue Oct 23, 2:14 am)
Re: LSM conversion to static interface, Jan Engelhardt, (Tue Oct 23, 2:18 am)
Re: LSM conversion to static interface, Serge E. Hallyn, (Tue Oct 23, 8:20 am)
Re: LSM conversion to static interface, Jan Engelhardt, (Tue Oct 23, 8:28 am)
Re: LSM conversion to static interface, Serge E. Hallyn, (Tue Oct 23, 8:34 am)
Re: LSM conversion to static interface [revert patch], Jeremy Fitzhardinge, (Tue Oct 23, 5:31 pm)
Re: LSM conversion to static interface [revert patch], Chris Wright, (Tue Oct 23, 5:32 pm)
Re: LSM conversion to static interface [revert patch], Arjan van de Ven, (Tue Oct 23, 10:06 pm)
Re: Linux Security *Module* Framework (Was: LSM conversion ..., Bernd Petrovitsch, (Thu Oct 25, 2:19 am)
Re: LSM conversion to static interface, Valdis.Kletnieks, (Thu Oct 25, 3:23 am)
Re: Linux Security *Module* Framework (Was: LSM conversion ..., Arjan van de Ven, (Thu Oct 25, 10:10 am)
Re: eradicating out of tree modules, Stefan Richter, (Sat Oct 27, 10:31 am)
Re: eradicating out of tree modules, Stefan Richter, (Sun Oct 28, 2:25 am)
Re: eradicating out of tree modules, Tilman Schmidt, (Sun Oct 28, 5:01 am)
Re: eradicating out of tree modules, Stefan Richter, (Sun Oct 28, 7:37 am)
Re: eradicating out of tree modules, Simon Arlott, (Sun Oct 28, 7:59 am)
Re: eradicating out of tree modules, Tilman Schmidt, (Sun Oct 28, 9:55 am)
Re: eradicating out of tree modules, Tilman Schmidt, (Sun Oct 28, 11:51 am)
Re: eradicating out of tree modules, Adrian Bunk, (Sun Oct 28, 12:25 pm)
Re: Linux Security *Module* Framework, Tilman Schmidt, (Sun Oct 28, 12:42 pm)
Re: Linux Security *Module* Framework, Jan Engelhardt, (Sun Oct 28, 1:46 pm)
Re: Linux Security *Module* Framework (Was: LSM conversion ..., Arjan van de Ven, (Sun Oct 28, 10:12 pm)
Re: eradicating out of tree modules, Tilman Schmidt, (Mon Oct 29, 5:29 pm)
Re: Linux Security *Module* Framework (Was: LSM conversion ..., Bernd Petrovitsch, (Tue Oct 30, 2:41 am)
Re: eradicating out of tree modules, linux-os (Dick Johnson), (Tue Oct 30, 6:11 am)
Re: eradicating out of tree modules, Xavier Bestel, (Tue Oct 30, 6:19 am)
Re: eradicating out of tree modules, Greg KH, (Tue Oct 30, 8:30 am)