Author: xwhu
Date: Tue Feb 24 07:38:23 2009
New Revision: 55697
URL: http://svn.opensuse.org/viewcvs/yast?rev=55697&view=rev
Log:
Add support to SuSEFirewall.
Modified:
trunk/cluster/src/Cluster.ycp
trunk/cluster/src/common.ycp
trunk/cluster/src/dialogs.ycp
Modified: trunk/cluster/src/Cluster.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/cluster/src/Cluster.ycp?rev=55697&r1=55696&r2=55697&view=diff
==============================================================================
--- trunk/cluster/src/Cluster.ycp (original)
+++ trunk/cluster/src/Cluster.ycp Tue Feb 24 07:38:23 2009
@@ -40,6 +40,7 @@
import "Summary";
import "Message";
import "PackageSystem";
+import "SuSEFirewall";
/**
* Prototypes
@@ -255,14 +256,14 @@
/* Progress stage 2/3 */
_("Read the previous settings"),
/* Progress stage 3/3 */
- _("Detect the devices")
+ _("Read SuSEFirewall Settings")
], [
/* Progress step 1/3 */
_("Reading the database..."),
/* Progress step 2/3 */
_("Reading the previous settings..."),
/* Progress step 3/3 */
- _("Detecting the devices..."),
+ _("Reading SuSEFirewall settings..."),
/* Progress finished */
_("Finished")
],
@@ -309,6 +310,13 @@
sleep(sl);
// detect devices
+ SuSEFirewall::Read();
+ if (mcastport1 != "" && SuSEFirewall::HaveService(mcastport1, "UDP", "EXT")) {
+ SuSEFirewall::RemoveService(mcastport1, "UDP", "EXT");
+ }
+ if (enable2 && mcastport2 != "" && SuSEFirewall::HaveService(mcastport2, "UDP", "EXT")) {
+ SuSEFirewall::RemoveService(mcastport2, "UDP", "EXT");
+ }
if(Abort()) return false;
Progress::NextStage();
/* Error message */
@@ -346,12 +354,12 @@
/* Progress stage 1/2 */
_("Write the settings"),
/* Progress stage 2/2 */
- _("Run SuSEconfig")
+ _("Save changes to SuSEFirewall")
], [
/* Progress step 1/2 */
_("Writing the settings..."),
/* Progress step 2/2 */
- _("Running SuSEconfig..."),
+ _("Saving changes to SuSEFirewall..."),
/* Progress finished */
_("Finished")
],
@@ -366,13 +374,26 @@
if(false) Report::Error (_("Cannot write settings."));
sleep(sl);
+ /* Work with SuSEFirewall */
+ if (use_mgmtd == true) {
+ SuSEFirewall::AddService("5560", "TCP", "EXT");
+ } else {
+ SuSEFirewall::RemoveService("5560", "TCP", "EXT");
+ }
+ SuSEFirewall::AddService(mcastport1, "UDP", "EXT");
+ if (enable2 == true) {
+ SuSEFirewall::AddService(mcastport2, "UDP", "EXT");
+ }
+
// run SuSEconfig
+ SuSEFirewall::Write();
if(Abort()) return false;
Progress::NextStage ();
/* Error message */
if(false) Report::Error (Message::SuSEConfigFailed());
sleep(sl);
+ SuSEFirewall::ActivateConfiguration();
if(Abort()) return false;
/* Progress finished */
Progress::NextStage();
Modified: trunk/cluster/src/common.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/cluster/src/common.ycp?rev=55697&r1=55696&r2=55697&view=diff
==============================================================================
--- trunk/cluster/src/common.ycp (original)
+++ trunk/cluster/src/common.ycp Tue Feb 24 07:38:23 2009
@@ -7,6 +7,9 @@
import "Cluster";
import "Popup";
import "CWM";
+ import "CWMFirewallInterfaces";
+ import "SuSEFirewall";
+ import "SuSEFirewallServices";
list<string> DIALOG = [
"communication",
Modified: trunk/cluster/src/dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/cluster/src/dialogs.ycp?rev=55697&r1=55696&r2=55697&view=diff
==============================================================================
--- trunk/cluster/src/dialogs.ycp (original)
+++ trunk/cluster/src/dialogs.ycp Tue Feb 24 07:38:23 2009
@@ -38,6 +38,9 @@
import "Popup";
import "Service";
import "Report";
+import "CWMFirewallInterfaces";
+import "SuSEFirewall";
+import "SuSEFirewallServices";
include "cluster/helps.ycp";
include "cluster/common.ycp";
@@ -442,6 +445,14 @@
any ServiceDialog () {
any ret = nil;
+ /*
+ map