Author: juhliarik
Date: Thu Aug 6 13:50:12 2009
New Revision: 58289
URL: http://svn.opensuse.org/viewcvs/yast?rev=58289&view=rev
Log:
added support for SELinux
Modified:
trunk/bootloader/VERSION
trunk/bootloader/package/yast2-bootloader.changes
trunk/bootloader/src/clients/bootloader.ycp
trunk/bootloader/src/modules/BootCommon.ycp
trunk/bootloader/src/modules/Bootloader.ycp
trunk/bootloader/src/routines/dialogs.ycp
trunk/bootloader/src/routines/section_helps.ycp
trunk/bootloader/src/routines/section_widgets.ycp
Modified: trunk/bootloader/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/VERSION?rev=58289&r1=58288&r2=58289&view=diff
==============================================================================
--- trunk/bootloader/VERSION (original)
+++ trunk/bootloader/VERSION Thu Aug 6 13:50:12 2009
@@ -1 +1 @@
-2.18.13
+2.18.14
Modified: trunk/bootloader/package/yast2-bootloader.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/package/yast2-bootloader.changes?rev=58289&r1=58288&r2=58289&view=diff
==============================================================================
--- trunk/bootloader/package/yast2-bootloader.changes (original)
+++ trunk/bootloader/package/yast2-bootloader.changes Thu Aug 6 13:50:12 2009
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Thu Aug 6 10:31:03 CEST 2009 - juhliarik@suse.cz
+
+- added support for enable SELinux (fate#305557)
+- 2.18.14
+
+-------------------------------------------------------------------
Tue Aug 4 16:52:57 CEST 2009 - juhliarik@suse.cz
- added support for redundancy md array (fate#305008)
Modified: trunk/bootloader/src/clients/bootloader.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/clients/bootloader.ycp?rev=58289&r1=58288&r2=58289&view=diff
==============================================================================
--- trunk/bootloader/src/clients/bootloader.ycp (original)
+++ trunk/bootloader/src/clients/bootloader.ycp Thu Aug 6 13:50:12 2009
@@ -16,6 +16,7 @@
*/
{
textdomain "bootloader";
+
import "BootCommon";
import "Bootloader";
import "CommandLine";
@@ -268,6 +269,7 @@
any ret = CommandLine::Run (cmdline);
// boolean ret = GuiHandler ();
+
y2milestone ("Finishing bootloader configuration module");
return ret;
}
Modified: trunk/bootloader/src/modules/BootCommon.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/modules/BootCommon.ycp?rev=58289&r1=58288&r2=58289&view=diff
==============================================================================
--- trunk/bootloader/src/modules/BootCommon.ycp (original)
+++ trunk/bootloader/src/modules/BootCommon.ycp Thu Aug 6 13:50:12 2009
@@ -302,6 +302,11 @@
*/
global boolean enable_md_array_redundancy = nil;
+/** FATE#305557: Enable SELinux for 11.2
+ * if true create /selinux directory
+ */
+global boolean enable_selinux = false;
+
global define string getLoaderType (boolean recheck);
global define list<string> getBootloaders ();
Modified: trunk/bootloader/src/modules/Bootloader.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/modules/Bootloader.ycp?rev=58289&r1=58288&r2=58289&view=diff
==============================================================================
--- trunk/bootloader/src/modules/Bootloader.ycp (original)
+++ trunk/bootloader/src/modules/Bootloader.ycp Thu Aug 6 13:50:12 2009
@@ -62,7 +62,7 @@
global define boolean UpdateGfxMenu ();
global define void DelDuplicatedSections();
global define void ResolveSymlinksInSections();
-
+ void createSELinuxDir ();
/**
* Write is repeating again
* Because of progress bar during inst_finish
@@ -572,9 +572,10 @@
// call bootloader executable
y2milestone ("Calling bootloader executable");
ret = ret && blWrite ();
-
- if (! ret)
- {
+ // FATE#305557: Enable SELinux for 11.2
+ createSELinuxDir ();
+ if (! ret)
+ {
y2error ("Installing bootloader failed");
if (writeErrorPopup ())
{
@@ -586,19 +587,17 @@
return Write ();
}
}
- }
- else
- {
- if (BootCommon::InstallingToFloppy ())
- {
- BootCommon::updateTimeoutPopupForFloppy
- (BootCommon::getLoaderName (getLoaderType (), `summary));
}
+ else
+ {
+ if (BootCommon::InstallingToFloppy ())
+ {
+ BootCommon::updateTimeoutPopupForFloppy
+ (BootCommon::getLoaderName (getLoaderType (), `summary));
+ }
+ }
-
- }
-
- return ret;
+ return ret;
}
@@ -707,7 +706,8 @@
// call bootloader executable
y2milestone ("Calling bootloader executable");
ret = ret && blWrite ();
-
+ // FATE#305557: Enable SELinux for 11.2
+ createSELinuxDir ();
if (! ret)
{
y2error ("Installing bootloader failed");
@@ -1545,4 +1545,32 @@
return true;
}
+
+/** Fate #305557: Enable SELinux for 11.2
+ * Function cerate /selinux directory
+ * if SELinux is enabled
+ */
+
+void createSELinuxDir ()
+{
+ string path_file = "/selinux";
+ string cmd = "ls -d /selinux 2>/dev/null";
+ if (BootCommon::enable_selinux)
+ {
+ if (Mode::normal() || Mode::installation())
+ {
+ map out = (map)SCR::Execute(.target.bash_output, cmd);
+ y2milestone("runnning command: \"%1\" and return: %2", cmd, out);
+ if (out["stdout"]:"" != "/selinux\n")
+ SCR::Execute(.target.mkdir, path_file);
+ else
+ y2milestone("Directory /selinux already exist");
+ } else {
+ y2milestone("Skip creating /selinux directory -> wrong mode");
+ }
+ } else {
+ y2milestone("Skip creating /selinux directory");
+ }
+}
+
}
Modified: trunk/bootloader/src/routines/dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/routines/dialogs.ycp?rev=58289&r1=58288&r2=58289&view=diff
==============================================================================
--- trunk/bootloader/src/routines/dialogs.ycp (original)
+++ trunk/bootloader/src/routines/dialogs.ycp Thu Aug 6 13:50:12 2009
@@ -164,7 +164,12 @@
// frame
`Frame (_("Section Settings"), `HBox (`HSpacing (2), `VBox (
`VSpacing (1),
- `Left("noverifyroot"),
+ `HBox
+ (
+ `Left("noverifyroot"),
+ `HSpacing(2),
+ `Left("enable_selinux")
+ ),
"image",
"initrd",
`HBox (
@@ -178,7 +183,7 @@
), `HSpacing (2));
list<string> widget_names = ["name", "image", "initrd", "root", "vgamode", "append"
- ,"noverifyroot"];
+ ,"noverifyroot", "enable_selinux"];
map