Author: locilka
Date: Wed Jul 16 18:42:13 2008
New Revision: 49191
URL: http://svn.opensuse.org/viewcvs/yast?rev=49191&view=rev
Log:
- Support for conflicting services has been dropped from
SuSEFirewall* modules (replaced by services defined by packages).
Modified:
trunk/yast2/library/network/src/SuSEFirewall.ycp
trunk/yast2/library/network/src/SuSEFirewallServices.ycp
trunk/yast2/package/yast2.changes
Modified: trunk/yast2/library/network/src/SuSEFirewall.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/network/src/SuSEFirewall.ycp?rev=49191&r1=49190&r2=49191&view=diff
==============================================================================
--- trunk/yast2/library/network/src/SuSEFirewall.ycp (original)
+++ trunk/yast2/library/network/src/SuSEFirewall.ycp Wed Jul 16 18:42:13 2008
@@ -6,7 +6,7 @@
* Summary: Interface manipulation of /etc/sysconfig/SuSEFirewall
* Authors: Lukas Ocilka
*
- * $id$
+ * $Id$
*
* Module for handling SuSEfirewall2.
*/
@@ -900,43 +900,6 @@
});
}
- /**
- * Local function returns conflicting services.
- *
- * @return list <string> of services
- */
- list <string> GetPossiblyConflictServices () {
- return SuSEFirewallServices::GetPossiblyConflictServices();
- }
-
- /**
- * Local function for handling conflicting services in memory.
- * Makes sense for services which share ports like RPC services.
- *
- * @param string service id
- * @param boolean enable or disable
- */
- void HandleConflictService(string service, string zone, boolean enable) {
- // only possibly conflict services are handled
- if (! contains(GetPossiblyConflictServices(), service)) return;
-
- SetModified();
-
- if (enable) {
- // adding new conflict service into list of allowed services
- allowed_conflict_services[zone] = toset(add(allowed_conflict_services[zone]:[], service));
- } else {
- // removing current conflict service from list
- allowed_conflict_services[zone] = filter(string filter_service, allowed_conflict_services[zone]:[], {
- return filter_service != service;
- });
- // adding all allowed conflict services again
- foreach (string conflict_service, allowed_conflict_services[zone]:[], {
- AddServiceSupportIntoZone (conflict_service, zone);
- });
- }
- }
-
// <!-- SuSEFirewall LOCAL FUNCTIONS //-->
// <!-- SuSEFirewall GLOBAL FUNCTIONS //-->
@@ -2192,11 +2155,9 @@
if (new_status == true) {
y2milestone("Adding '%1' into '%2' zone", service_id, firewall_zone);
AddServiceSupportIntoZone(service_id, firewall_zone);
- HandleConflictService(service_id, firewall_zone, true);
} else {
y2milestone("Removing '%1' from '%2' zone", service_id, firewall_zone);
RemoveServiceSupportFromZone(service_id, firewall_zone);
- HandleConflictService(service_id, firewall_zone, false);
}
});
});
@@ -2230,46 +2191,6 @@
}
/**
- * Local function check is any of possibly conflicting services was turned on in
- * the firewall configuration.
- */
- void CheckAllPossiblyConflictingServices () {
- // For all known zones
- foreach (string zone, GetKnownFirewallZones(), {
- // Exception:
- // There are no possible conflicts if zone isn't protected
- if (zone == "INT" && ! GetProtectFromInternalZone()) return;
-
- // For all possible conflicting services
- foreach (string service, GetPossiblyConflictServices(), {
- // Possibly conflicting service is supported (on)
- if (IsServiceSupportedInZone (service, zone) == true) {
- allowed_conflict_services[zone] = add (allowed_conflict_services[zone]:[], service);
- }
- });
-
- // Exception:
- // NIS-client's ports are the subset of NIS-server's ports
- if (
- contains(allowed_conflict_services[zone]:[], "nis-server")
- &&
- contains(allowed_conflict_services[zone]:[], "nis-client")
- ) {
- // Removing nis-client from allowed services, when both of them found
- y2warning("Ignoring found nis-client as the subset of nis-server, for zone %1", zone);
- allowed_conflict_services[zone] = filter (
- string service, allowed_conflict_services[zone]:[], {
- return service != "nis-client";
- }
- );
- }
- allowed_conflict_services[zone] = toset(allowed_conflict_services[zone]:[]);
- });
-
- y2milestone("Possibly conflicting services found allowed: %1", allowed_conflict_services);
- }
-
- /**
* Local function sets the default configuration and fills internal values.
*/
void ReadDefaultConfiguration () {
@@ -2388,7 +2309,8 @@
// checking if any possibly conficting services were turned on in configuration
// filling internal values for later checkings
- CheckAllPossiblyConflictingServices();
+ // CheckAllPossiblyConflictingServices();
+ // -- Function has been turned off as we don't support services defined by YaST itself anymore --
y2milestone("Firewall configuration has been read: %1.", SETTINGS);
// to read configuration only once
Modified: trunk/yast2/library/network/src/SuSEFirewallServices.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/network/src/SuSEFirewallServices.ycp?rev=49191&r1=49190&r2=49191&view=diff
==============================================================================
--- trunk/yast2/library/network/src/SuSEFirewallServices.ycp (original)
+++ trunk/yast2/library/network/src/SuSEFirewallServices.ycp Wed Jul 16 18:42:13 2008
@@ -27,11 +27,6 @@
//
//
- // FIXME: repair by implementing FATE #300687: Ports for SuSEfirewall added via packages.
- // add definition of services to the respective package
- /* list of possibly conflict services because of sharing ports, for instance: "nis-server" and "nfs-server" */
- list <string> possibly_conflict_services = ["nfs-server", "nis-server", "nfs-client"];
-
/***
* Names assigned to Port and Protocol numbers can be found
* here:
@@ -663,11 +658,12 @@
/**
* Function returns list of possibly conflicting services.
* Conflicting services are for instance nis-client and nis-server.
+ * DEPRECATED - we currently don't have such services - services are defined by packages.
*
* @return list <string> of conflicting services
*/
global define list <string> GetPossiblyConflictServices () {
- return possibly_conflict_services;
+ return [];
}
/* EOF */
Modified: trunk/yast2/package/yast2.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/package/yast2.changes?rev=49191&r1=49190&r2=49191&view=diff
==============================================================================
--- trunk/yast2/package/yast2.changes (original)
+++ trunk/yast2/package/yast2.changes Wed Jul 16 18:42:13 2008
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Wed Jul 16 18:41:13 CEST 2008 - locilka@suse.cz
+
+- Support for conflicting services has been dropped from
+ SuSEFirewall* modules (replaced by services defined by packages).
+
+-------------------------------------------------------------------
Tue Jul 15 13:37:09 CEST 2008 - locilka@suse.cz
- Fixed Linuxrc::SaveInstallInf function to really copy the
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org