Re: [PATCH try #3] security: Convert LSM into a static interface

Greg KH
2007-07-24T20:02:52Z

On Tue, Jul 24, 2007 at 01:58:46AM -0700, Andrew Morton wrote:
> On Tue, 24 Jul 2007 01:53:58 -0700 Greg KH <greg@kroah.com> wrote:
>
> > On Tue, Jul 24, 2007 at 01:02:24AM -0700, Andrew Morton wrote:
> > > On Sat, 14 Jul 2007 12:37:01 -0400 (EDT) James Morris <jmorris@namei.org> wrote:
> > >
> > > > Convert LSM into a static interface
> > >
> > > allmodconfig broke
> > >
> > > security/built-in.o: In function `rootplug_bprm_check_security':
> > > security/root_plug.c:64: undefined reference to `usb_find_device'
> > > security/root_plug.c:70: undefined reference to `usb_put_dev'
> >
> > That's wierd, who would have disabled the exports of those functions or
> > removed the "#include <linux/usb.h>" from this file?
> >
>
> root_plug is linked into vmlinux and usb is modular. I did this:
>
> --- a/security/Kconfig~security-convert-lsm-into-a-static-interface-fix-2
> +++ a/security/Kconfig
> @@ -82,7 +82,7 @@ config SECURITY_CAPABILITIES
>
> config SECURITY_ROOTPLUG
> bool "Root Plug Support"
> - depends on USB && SECURITY
> + depends on USB=y && SECURITY
> 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

That looks correct to me.

thanks,

greg k-h