You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
weak-modules2: obtain list of initrd modules from dracut (jsc#PED-1915)
After previous patch we ignore INITRD_MODULES. That means that we will
obtain the list of modules to include from the current initrd. But that
might not be enough if new modules are to be added. We should read the
dracut configuration, which is supposed to replace INITRD_MODULES.
Obtain the list of dracut configuration files (code copied from dracut 059)
and parse the content to obtain the values of the variables that affect
the list of modules ("drivers" in dracut nomenclature) to be included.
This is not exactly like dracut's logic because we don't have the module
autodetection. But it comes close, in particular if we add in the
modules from the existing initrd. In practice, what matters most is that
we understand "add_drivers+=" directives that 3rd party module authors
may put into the dracut configuration.
This code executes "arbitrary" scripts as root with bash, which is insecure.
dracut does this, too, so this doesn't pose additional danger to the
system. However, in wm2 we can source these scripts with reduced privileges,
because we just need to set some variables.
Signed-off-by: Martin Wilck <[email protected]>
0 commit comments