2003-06-01 18:31:20

by Adrian Bunk

[permalink] [raw]
Subject: [2.5 patch] SECURITY_ROOTPLUG must depend on USB

The following patch lets SECURITY_ROOTPLUG depend on USB (otherwise
there are link errors since Root Plug Support needs
usb_bus_list{,_lock}):


--- linux-2.5.70-mm3/security/Kconfig.old 2003-06-01 20:40:40.000000000 +0200
+++ linux-2.5.70-mm3/security/Kconfig 2003-06-01 20:41:00.000000000 +0200
@@ -33,7 +33,7 @@

config SECURITY_ROOTPLUG
tristate "Root Plug Support"
- depends on SECURITY!=n
+ depends on USB && SECURITY!=n
help
This is a sample LSM module that should only be used as such.
It prevents any programs running with egid == 0 if a specific


cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed


2003-06-02 17:09:21

by Greg KH

[permalink] [raw]
Subject: Re: [2.5 patch] SECURITY_ROOTPLUG must depend on USB

On Sun, Jun 01, 2003 at 08:44:36PM +0200, Adrian Bunk wrote:
> The following patch lets SECURITY_ROOTPLUG depend on USB (otherwise
> there are link errors since Root Plug Support needs
> usb_bus_list{,_lock}):

Applied, thanks.

greg k-h

2003-06-02 21:03:59

by Chris Wright

[permalink] [raw]
Subject: Re: [2.5 patch] SECURITY_ROOTPLUG must depend on USB

* Greg KH ([email protected]) wrote:
> On Sun, Jun 01, 2003 at 08:44:36PM +0200, Adrian Bunk wrote:
> > The following patch lets SECURITY_ROOTPLUG depend on USB (otherwise
> > there are link errors since Root Plug Support needs
> > usb_bus_list{,_lock}):
>
> Applied, thanks.

While we're at it, here's a tiny cleanup for a compile warning from John
Cherry's build stats[1]. You may have a cleaner way you'd rather handle
this.

CC [M] security/root_plug.o
security/root_plug.c:57:1: warning: "dbg" redefined
In file included from security/root_plug.c:30:
include/linux/usb.h:979:1: warning: this is the location of the previous definition

thanks,
-chris

[1] http://www.osdl.org/archive/cherry/stability/linux-2.5.69.results/2.5.69.allmodconfig.modules.txt
--
Linux Security Modules http://lsm.immunix.org http://lsm.bkbits.net

===== security/root_plug.c 1.2 vs edited =====
--- 1.2/security/root_plug.c Wed Dec 18 15:09:26 2002
+++ edited/security/root_plug.c Mon Jun 2 11:42:21 2003
@@ -54,6 +54,9 @@
#define MY_NAME "root_plug"
#endif

+#ifdef dbg
+#undef dbg
+#endif
#define dbg(fmt, arg...) \
do { \
if (debug) \

2003-06-02 21:26:14

by Greg KH

[permalink] [raw]
Subject: Re: [2.5 patch] SECURITY_ROOTPLUG must depend on USB

On Mon, Jun 02, 2003 at 02:13:16PM -0700, Chris Wright wrote:
> * Greg KH ([email protected]) wrote:
> > On Sun, Jun 01, 2003 at 08:44:36PM +0200, Adrian Bunk wrote:
> > > The following patch lets SECURITY_ROOTPLUG depend on USB (otherwise
> > > there are link errors since Root Plug Support needs
> > > usb_bus_list{,_lock}):
> >
> > Applied, thanks.
>
> While we're at it, here's a tiny cleanup for a compile warning from John
> Cherry's build stats[1]. You may have a cleaner way you'd rather handle
> this.

Thanks, but I already sent Linus a patch to clean this up in a different
way.

greg k-h