[Fedora-livecd-list] Can't log in

Alan Pevec apevec at gmail.com
Tue Sep 28 09:00:21 UTC 2010


Hi,

those files are created after setfiles is executed in SelinuxConfig,
by NetworkConfig and RPMMacroConfig, see ImageCreator.configure() excerpt:
        ksh = self.ks.handler

        kickstart.LanguageConfig(self._instroot).apply(ksh.lang)
        kickstart.KeyboardConfig(self._instroot).apply(ksh.keyboard)
        kickstart.TimezoneConfig(self._instroot).apply(ksh.timezone)
        kickstart.AuthConfig(self._instroot).apply(ksh.authconfig)
        kickstart.SelinuxConfig(self._instroot).apply(ksh.selinux)
        kickstart.FirewallConfig(self._instroot).apply(ksh.firewall)
        kickstart.RootPasswordConfig(self._instroot).apply(ksh.rootpw)
        kickstart.ServicesConfig(self._instroot).apply(ksh.services)
        kickstart.XConfig(self._instroot).apply(ksh.xconfig)
        kickstart.NetworkConfig(self._instroot).apply(ksh.network)
        kickstart.RPMMacroConfig(self._instroot).apply(self.ks)

        self._create_bootconfig()

        self.__run_post_scripts()


setfiles should execute last, even after post scripts, to ensure
contexts for all files are set correctly, but then again we probably
need correct selinux contexts in order to run post scripts as well.
Dan, is there any harm running setfiles twice, at the current location
and then once more at the end ?

--- a/imgcreate/creator.py
+++ b/imgcreate/creator.py
@@ -741,6 +741,8 @@ class ImageCreator(object):

         self.__run_post_scripts()

+        kickstart.SelinuxConfig(self._instroot).apply(ksh.selinux)
+
     def launch_shell(self):
         """Launch a shell in the install root.


More information about the livecd mailing list