Author: mzugec
Date: Tue Apr 22 17:33:32 2008
New Revision: 46964
URL: http://svn.opensuse.org/viewcvs/yast?rev=46964&view=rev
Log:
fixed Missing "Open Firewall Ports" checkbox in wizard expert
(bnc#378742)
Modified:
trunk/http-server/VERSION
trunk/http-server/package/yast2-http-server.changes
trunk/http-server/src/HttpServer.ycp
trunk/http-server/src/HttpServerWidgets.ycp
trunk/http-server/src/dialogs.ycp
trunk/http-server/src/wizard-dialog.ycp
trunk/http-server/src/wizards.ycp
Modified: trunk/http-server/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/http-server/VERSION?rev=46964&r1=46963&r2=46964&view=diff
==============================================================================
--- trunk/http-server/VERSION (original)
+++ trunk/http-server/VERSION Tue Apr 22 17:33:32 2008
@@ -1 +1 @@
-2.16.6
+2.16.7
Modified: trunk/http-server/package/yast2-http-server.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/http-server/package/yast2-http-server.changes?rev=46964&r1=46963&r2=46964&view=diff
==============================================================================
--- trunk/http-server/package/yast2-http-server.changes (original)
+++ trunk/http-server/package/yast2-http-server.changes Tue Apr 22 17:33:32 2008
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Tue Apr 22 17:30:57 CEST 2008 - mzugec@suse.cz
+
+- fixed Missing "Open Firewall Ports" checkbox in wizard expert
+ (bnc#378742)
+- 2.16.7
+
+-------------------------------------------------------------------
Thu Apr 3 01:20:12 CEST 2008 - mzugec@suse.de
- check checksums from configuration files (FaTE#303374)
Modified: trunk/http-server/src/HttpServer.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/http-server/src/HttpServer.ycp?rev=46964&r1=46963&r2=46964&view=diff
==============================================================================
--- trunk/http-server/src/HttpServer.ycp (original)
+++ trunk/http-server/src/HttpServer.ycp Tue Apr 22 17:33:32 2008
@@ -71,18 +71,12 @@
include "http-server/routines.ycp";
-global boolean firewall = false;
-global boolean firewall_first = true;
-
/**
* Mapping of IPs to network devices
*/
global map ip2device = $[];
-global boolean getFirewallStatus(){
- return firewall;
-}
list<string> files_to_check = ["/etc/sysconfig/apache2", "/etc/apache2/default-server.conf", "/etc/apache2/httpd.conf", "/etc/apache2/listen.conf", "/etc/apache2/vhosts.d/yast2_vhosts.conf"];
@@ -195,7 +189,6 @@
configured_dns = true;
}
Progress::set(true); //on();
-// firewall_started = SuSEFirewall::IsEnabled(); //Service::Enabled( "SuSEfirewall2_final" );
// read current settings from httpd.conf and sysconfig
Progress::NextStage();
@@ -283,28 +276,6 @@
y2milestone ("Mapping of IP addresses and network devices: %1", ip2device);
- // now, check the firewall status to set up the original status correctly
- firewall = true;
- foreach (map listen, YaST::HTTPDData::GetCurrentListen (),
- {
- // find out the port and host
- string port = listen["PORT"]:"";
- string ip = listen["ADDRESS"]:"";
-
- firewall = SuSEFirewall::HaveService ( port, "TCP", ip2device[ip]:"any");
-
- if (!firewall && port == "80")
- {
- // also try http name
- firewall = SuSEFirewall::HaveService ( "http", "TCP", ip2device[ip]:"any");
- }
-
- y2milestone ("Status of firewall for %2:%1: %3", ip, port, firewall);
-
- // the firewall is not properly opened
- if (! firewall)
- break;
- });
Progress::set(true); //on();
@@ -432,6 +403,9 @@
Report::Error( Message::CannotAdjustService("apache2") );
}
}
+ // configuration test
+// map test = (map)SCR::Execute(.target.bash_output, "apache2ctl conftest");
+//y2internal("test %1", test);
foreach(string file, files_to_check, {
FileChanges::StoreFileCheckSum( file );
@@ -540,12 +514,6 @@
{
YaST::HTTPDData::ModifyService (s["service"]:false);
}
-
- // setup firewall
- if (haskey( s, "firewall" ))
- {
- firewall = s["firewall"]:false;
- }
modified = false;
configured = true;
@@ -614,7 +582,6 @@
"hosts" : hosts,
"Listen": YaST::HTTPDData::GetCurrentListen(),
"service" : YaST::HTTPDData::GetService (),
- "firewall" : firewall,
];
configured = true;
Modified: trunk/http-server/src/HttpServerWidgets.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/http-server/src/HttpServerWidgets.ycp?rev=46964&r1=46963&r2=46964&view=diff
==============================================================================
--- trunk/http-server/src/HttpServerWidgets.ycp (original)
+++ trunk/http-server/src/HttpServerWidgets.ycp Tue Apr 22 17:33:32 2008
@@ -1407,14 +1407,6 @@
"help" : HELPS["firewall_adapt"]:"",
"display_details" : true,
]),
- "firewall_first" : $[
- "widget" : `checkbox,
- // translators: checkbox label
- "label" : _("Open &Firewall on Selected Ports"),
- "help" : HELPS["firewall_adapt"]:"",
- "init" : initAdaptFirewall,
- "store" : storeAdaptFirewall,
- ],
"host" : hostwidget,
"LISTEN" : $[
"widget" : `custom,
@@ -2706,33 +2698,6 @@
return nil;
}
-// ************************************ Adapt firewall widget ********************
-
- /**
- * Initialization function for firewall adapting
- * @param key any option key to be initialized
- */
- global void initAdaptFirewall (string key) ``{
- if( SuSEFirewall::IsStarted() ) {
- UI::ChangeWidget (`id (key), `Value, HttpServer::getFirewallStatus());
- UI::ChangeWidget (`id (key), `Enabled, true );
- } else {
- // disable the widget
- UI::ChangeWidget (`id (key), `Enabled, false );
- }
- }
-
- /**
- * Store function for firewall adapting
- * @param opt_id any option id
- * @param event map event description
- */
- global void storeAdaptFirewall (string opt_id, map event) ``{
- if( SuSEFirewall::IsStarted() ) {
- HttpServer::firewall = (boolean)UI::QueryWidget (`id (opt_id), `Value);
- HttpServer::modified = true;
- }
- }
/* these are for future use: */
// error message - the entered ip address is not found
@@ -2828,33 +2793,6 @@
}
- /**
- * Initialize firewall settings
- * @param key string
- */
-global define void initFwOpen (string key) ``{
- y2milestone("initializing firewall open ...");
- if( SuSEFirewall::IsStarted() ) {
- UI::ChangeWidget (`id (key), `Value, true);
- UI::ChangeWidget (`id (key), `Enabled, true );
- } else {
- // disable the widget
- UI::ChangeWidget (`id (key), `Enabled, false );
- }
-}
-
- /**
- * Store firewall settings
- * @param opt_id string
- * @param event map
- */
- global define void storeFwOpen (string opt_id, map event) ``{
- if( SuSEFirewall::IsEnabled() || Mode::config ()) {
- HttpServer::firewall = (boolean)UI::QueryWidget (`id (opt_id), `Value);
- HttpServer::modified = true;
- }
- }
-
// *********************** Wizard Dialog 2 Widgets *****************************************
/**
Modified: trunk/http-server/src/dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/http-server/src/dialogs.ycp?rev=46964&r1=46963&r2=46964&view=diff
==============================================================================
--- trunk/http-server/src/dialogs.ycp (original)
+++ trunk/http-server/src/dialogs.ycp Tue Apr 22 17:33:32 2008
@@ -112,7 +112,7 @@
*/
symbol OverviewDialog () {
string caption = _("HTTP Server Configuration");
- if (HttpServer::firewall_first) tabs_descr["listen", "widget_names"]= [ "server_enable", "LISTEN", "logs" ];
+// if (HttpServer::firewall_first) tabs_descr["listen", "widget_names"]= [ "server_enable", "LISTEN", "logs" ];
map widget_descr = $[
"tab": CWMTab::CreateWidget($[
"tab_order": [ "listen", "modules", "main_host", "hosts"],
Modified: trunk/http-server/src/wizard-dialog.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/http-server/src/wizard-dialog.ycp?rev=46964&r1=46963&r2=46964&view=diff
==============================================================================
--- trunk/http-server/src/wizard-dialog.ycp (original)
+++ trunk/http-server/src/wizard-dialog.ycp Tue Apr 22 17:33:32 2008
@@ -32,13 +32,14 @@
`VSpacing(0.5),
"listen_interfaces",
`VSpacing(0.5),
- "firewall_first",
+// "firewall_first",
+ "firewall_adapt",
`VSpacing(8)
),
`HStretch()
// )
);
- list<string> widget_names = ["open_port", "listen_interfaces", "firewall_first"];
+ list<string> widget_names = ["open_port", "listen_interfaces", /*"firewall_first"*/"firewall_adapt"];
list