Author: mzugec
Date: Tue Jan 22 15:24:53 2008
New Revision: 43825
URL: http://svn.opensuse.org/viewcvs/yast?rev=43825&view=rev
Log:
use SuSEFirewallServices for list of ports (#264112)
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/wizard-dialog.ycp
Modified: trunk/http-server/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/http-server/VERSION?rev=43825&r1=43824&r2=43825&view=diff
==============================================================================
--- trunk/http-server/VERSION (original)
+++ trunk/http-server/VERSION Tue Jan 22 15:24:53 2008
@@ -1 +1 @@
-2.15.9
+2.15.10
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=43825&r1=43824&r2=43825&view=diff
==============================================================================
--- trunk/http-server/package/yast2-http-server.changes (original)
+++ trunk/http-server/package/yast2-http-server.changes Tue Jan 22 15:24:53 2008
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Tue Jan 22 15:11:12 CET 2008 - mzugec@suse.cz
+
+- use SuSEFirewallServices for list of ports (#264112)
+- 2.15.10
+
+-------------------------------------------------------------------
Wed Dec 5 17:02:48 CET 2007 - mzugec@suse.cz
- be clonable in autoYaST (AutoInstClonable in desktop file)
Modified: trunk/http-server/src/HttpServer.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/http-server/src/HttpServer.ycp?rev=43825&r1=43824&r2=43825&view=diff
==============================================================================
--- trunk/http-server/src/HttpServer.ycp (original)
+++ trunk/http-server/src/HttpServer.ycp Tue Jan 22 15:24:53 2008
@@ -30,6 +30,7 @@
import "NetworkService";
import "SuSEFirewall";
import "Confirm";
+import "SuSEFirewallServices";
/**
* Abort function
@@ -375,48 +376,17 @@
y2error ("Writing listen failed, firewall problems?");
}
- // firewall should not be open, close all ports still open
- // the ones from deleted Listen statements were closed in WriteListen
- if (firewall_first)
- {
-// list<string> zones = [];
-/*
-foreach(map ifc, SuSEFirewall::GetAllKnownInterfaces(), {
- if (!contains(zones, ifc["zone"]:"")) zones = add(zones, ifc["zone"]:"");
-});
-*/
-//list <string> interfaces=[];
-//foreach(map row, SuSEFirewall::GetAllKnownInterfaces(), { interfaces = add(interfaces, row["id"]:""); });
-list<string> zones = SuSEFirewall::GetZonesOfInterfacesWithAnyFeatureSupported( SuSEFirewall::GetListOfKnownInterfaces() );
-y2milestone("Firewall zones %1", zones);
-
-
- foreach (map listen, YaST::HTTPDData::GetCurrentListen (),
- {
- // find out the port and host
- string port = listen["PORT"]:"";
- string ip = listen["ADDRESS"]:"";
- // fixed #176722 - assigned loopback for firewall
- if(ip == "127.0.0.1") continue;
- if (!firewall)
- {
- y2milestone ("Removing service %1:%2", ip, port);
- if (ip2device[ip]:""=="") foreach(string zone, zones, {
- SuSEFirewall::RemoveService ( port, "TCP", zone);
- });
- else SuSEFirewall::RemoveService ( port, "TCP", ip2device[ip]:"all");
- }
- else
- {
- y2milestone ("Adding service %1:%2", ip, port);
-
- if (ip2device[ip]:""=="") foreach(string zone, zones, {
- SuSEFirewall::AddService ( port, "TCP", zone);
- });
- else SuSEFirewall::AddService ( port, "TCP", ip2device[ip]:"all");
- }
+ // Firewall
+ list <string> ports=[];
+ foreach(map row, YaST::HTTPDData::GetCurrentListen(), {
+ ports = add(ports, row["PORT"]:"");
});
- }
+ SuSEFirewallServices::SetNeededPortsAndProtocols("service:apache2",
+ $[
+ "tcp_ports" : ports,
+ "udp_ports" : [],
+ ]);
+
SuSEFirewall::Write ();
if (configured_dns) DnsServerAPI::Write ();
Progress::set(true);
Modified: trunk/http-server/src/HttpServerWidgets.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/http-server/src/HttpServerWidgets.ycp?rev=43825&r1=43824&r2=43825&view=diff
==============================================================================
--- trunk/http-server/src/HttpServerWidgets.ycp (original)
+++ trunk/http-server/src/HttpServerWidgets.ycp Tue Jan 22 15:24:53 2008
@@ -1403,7 +1403,7 @@
"help" : HELPS["server_enable"]:"",
],
"firewall_adapt" : CWMFirewallInterfaces::CreateOpenFirewallWidget ($[
- "services" : [ "http" ],
+ "services" : [ "service:apache2" ],
"help" : HELPS["firewall_adapt"]:"",
"display_details" : true,
]),
Modified: trunk/http-server/src/wizard-dialog.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/http-server/src/wizard-dialog.ycp?rev=43825&r1=43824&r2=43825&view=diff
==============================================================================
--- trunk/http-server/src/wizard-dialog.ycp (original)
+++ trunk/http-server/src/wizard-dialog.ycp Tue Jan 22 15:24:53 2008
@@ -45,7 +45,7 @@
Wizard::SetContentsButtons (caption, contents, help,
Label::BackButton (), Label::NextButton ());
- Wizard::HideBackButton();
+ Wizard::DisableBackButton();
Wizard::SetAbortButton(`abort, Label::CancelButton () );
map event = $[];
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org