Hello community,
here is the log from the commit of package yast2-firewall
checked in at Tue Apr 3 19:59:40 CEST 2007.
--------
--- yast2-firewall/yast2-firewall.changes 2007-03-02 13:38:15.000000000 +0100
+++ /mounts/work_src_done/NOARCH/yast2-firewall/yast2-firewall.changes 2007-04-02 13:38:03.000000000 +0200
@@ -1,0 +2,6 @@
+Mon Apr 2 13:37:15 CEST 2007 - locilka@suse.cz
+
+- Show firewall summary details on request (#230042).
+- 2.15.4
+
+-------------------------------------------------------------------
Old:
----
yast2-firewall-2.15.3.tar.bz2
New:
----
yast2-firewall-2.15.4.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-firewall.spec ++++++
--- /var/tmp/diff_new_pack.m24487/_old 2007-04-03 19:55:56.000000000 +0200
+++ /var/tmp/diff_new_pack.m24487/_new 2007-04-03 19:55:56.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-firewall (Version 2.15.3)
+# spec file for package yast2-firewall (Version 2.15.4)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,12 +11,12 @@
# norootforbuild
Name: yast2-firewall
-Version: 2.15.3
+Version: 2.15.4
Release: 1
License: GNU General Public License (GPL)
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-firewall-2.15.3.tar.bz2
+Source0: yast2-firewall-2.15.4.tar.bz2
prefix: /usr
BuildRequires: perl-XML-Writer update-desktop-files yast2 yast2-devtools yast2-testsuite
# SuSEFirewallExpertRules::DeleteRuleID()
@@ -41,7 +41,7 @@
Lukas Ocilka
%prep
-%setup -n yast2-firewall-2.15.3
+%setup -n yast2-firewall-2.15.4
%build
%{prefix}/bin/y2tool y2autoconf
@@ -75,6 +75,9 @@
%doc %{prefix}/share/doc/packages/yast2-firewall
%changelog
+* Mon Apr 02 2007 - locilka@suse.cz
+- Show firewall summary details on request (#230042).
+- 2.15.4
* Fri Mar 02 2007 - locilka@suse.cz
- Adding forgotten handling of `cancel in the Summary dialog
(bugzilla #249777).
++++++ yast2-firewall-2.15.3.tar.bz2 -> yast2-firewall-2.15.4.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-firewall-2.15.3/src/dialogs.ycp new/yast2-firewall-2.15.4/src/dialogs.ycp
--- old/yast2-firewall-2.15.3/src/dialogs.ycp 2007-03-02 13:38:26.000000000 +0100
+++ new/yast2-firewall-2.15.4/src/dialogs.ycp 2007-04-02 13:38:24.000000000 +0200
@@ -4,7 +4,7 @@
* Summary: Configuration dialogs and workflow
* Authors: Lukas Ocilka
*
- * $Id: dialogs.ycp 36654 2007-03-02 12:38:24Z locilka $
+ * $Id: dialogs.ycp 37247 2007-04-02 11:38:22Z locilka $
*
* Configuration dialogs and workflow.
* Both Expert and Simple.
@@ -278,9 +278,9 @@
InitBoxSummary([]);
- symbol ret = nil;
+ any ret = nil;
while (true) {
- ret = (symbol) UI::UserInput();
+ ret = UI::UserInput();
if (ret == `back || ret == `next) break;
@@ -290,8 +290,15 @@
ret = `abort;
break;
}
+
+ if (ret == "show_details") {
+ SuSEFirewallUI::SetShowSummaryDetails (
+ (boolean) UI::QueryWidget (`id ("show_details"), `Value)
+ );
+ InitBoxSummary([]);
+ }
}
- return ret;
+ return (symbol) ret;
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-firewall-2.15.3/src/subdialogs.ycp new/yast2-firewall-2.15.4/src/subdialogs.ycp
--- old/yast2-firewall-2.15.3/src/subdialogs.ycp 2007-02-27 14:30:52.000000000 +0100
+++ new/yast2-firewall-2.15.4/src/subdialogs.ycp 2007-04-02 13:38:24.000000000 +0200
@@ -4,7 +4,7 @@
* Summary: Configuration screens
* Authors: Lukas Ocilka
*
- * $Id: subdialogs.ycp 36538 2007-02-27 13:30:50Z locilka $
+ * $Id: subdialogs.ycp 37247 2007-04-02 11:38:22Z locilka $
*
* Configuration dialogs divided into smaller logic groups.
* Both Expert and Simple.
@@ -947,9 +947,12 @@
}
term BoxSummary () {
- term dialog = `HBox (
+ term dialog = `VBox (
// TRANSLATORS: informative label in dialog
- `RichText(`id("box_summary_richtext"), _("Creating summary..."))
+ `RichText(`id("box_summary_richtext"), _("Creating summary...")),
+ `VSpacing (1),
+ // TRANSLATORS: check box in summary dialog
+ `Left(`CheckBox (`id ("show_details"), `opt (`notify), _("&Show Details")))
);
return dialog;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-firewall-2.15.3/src/summary.ycp new/yast2-firewall-2.15.4/src/summary.ycp
--- old/yast2-firewall-2.15.3/src/summary.ycp 2006-10-09 17:16:04.000000000 +0200
+++ new/yast2-firewall-2.15.4/src/summary.ycp 2007-04-02 13:38:24.000000000 +0200
@@ -6,7 +6,7 @@
* Summary: Firewall configuration summary
* Authors: Lukas Ocilka
*
- * $Id: summary.ycp 33291 2006-10-09 15:15:59Z locilka $
+ * $Id: summary.ycp 37247 2007-04-02 11:38:22Z locilka $
*
* Summary functions.
*/
@@ -19,7 +19,11 @@
import "SuSEFirewallUI";
import "Mode";
import "String";
- // import "NetworkService";
+
+ include "firewall/subdialogs.ycp";
+ include "firewall/uifunctions.ycp";
+
+ boolean show_details = false;
map protocol_type_names = $[
// TRANSLATORS: Summary item label
@@ -30,6 +34,8 @@
"RPC" : _("RPC Services"),
// TRANSLATORS: Summary item label
"IP" : _("IP Protocols"),
+ // TRANSLATORS: Summary item label
+ "BRD" : _("Broadcast Ports"),
];
string li_start = "<li>";
@@ -126,7 +132,69 @@
return ret_summary;
}
- string SummaryOpenServicesInZone(string zone_id) {
+ /**
+ * Returns HTML-formatted information about ports contained in a service
+ * defined by parameter service_id.
+ *
+ * @param string service_id
+ * @return string detailed information
+ */
+ string ShowServiceDetails (string service_id) {
+ list <string> tcp_ports = SuSEFirewallServices::GetNeededTCPPorts (service_id);
+ list <string> udp_ports = SuSEFirewallServices::GetNeededUDPPorts (service_id);
+ list <string> rpc_ports = SuSEFirewallServices::GetNeededRPCPorts (service_id);
+ list <string> ip_protocols = SuSEFirewallServices::GetNeededIPProtocols (service_id);
+ list <string> broadcast_ports = SuSEFirewallServices::GetNeededBroadcastPorts (service_id);
+
+ string ret = "";
+
+ // TCP ports
+ if (size (tcp_ports) > 0) {
+ // "ssh" -> "ssh (22)"
+ tcp_ports = maplist (string tcp_port, tcp_ports, {
+ return UserReadablePortName (tcp_port, "TCP");
+ });
+ ret = ret +
+ li_start + protocol_type_names["TCP"]:"" + ": " + mergestring (tcp_ports, ", ") + li_end + "\n";
+ }
+
+ // UDP Ports
+ if (size (udp_ports) > 0) {
+ udp_ports = maplist (string udp_port, udp_ports, {
+ return UserReadablePortName (udp_port, "UDP");
+ });
+ ret = ret +
+ li_start + protocol_type_names["UDP"]:"" + ": " + mergestring (udp_ports, ", ") + li_end + "\n";
+ }
+
+ // RPC Services
+ if (size (rpc_ports) > 0) {
+ ret = ret +
+ li_start + protocol_type_names["RPC"]:"" + ": " + mergestring (rpc_ports, ", ") + li_end + "\n";
+ }
+
+ // IP Protocols
+ if (size (ip_protocols) > 0) {
+ ret = ret +
+ li_start + protocol_type_names["IP"]:"" + ": " + mergestring (ip_protocols, ", ") + li_end + "\n";
+ }
+
+ // Broadcast (UDP)
+ if (size (broadcast_ports) > 0) {
+ broadcast_ports = maplist (string broadcast_port, broadcast_ports, {
+ return UserReadablePortName (broadcast_port, "UDP");
+ });
+ ret = ret +
+ li_start + protocol_type_names["BRD"]:"" + ": " + mergestring (broadcast_ports, ", ") + li_end + "\n";
+ }
+
+ if (ret == "")
+ return "";
+
+ return "\n" + ul_start + ret + ul_end + "\n";
+ }
+
+ string SummaryOpenServicesInZone (string zone_id, boolean show_details) {
string ret_val = "";
list <string> interfaces_in_zone = SuSEFirewall::GetInterfacesInZone(zone_id);
@@ -154,8 +222,13 @@
});
// Allowed known services
foreach (string service_name, string service_id, translations_to_service_ids, {
- if (SuSEFirewall::IsServiceSupportedInZone(service_id, zone_id)) {
- open_services = open_services + li_start + service_name + li_end + "\n";
+ if (SuSEFirewall::IsServiceSupportedInZone (service_id, zone_id)) {
+ open_services = open_services +
+ li_start +
+ service_name + (show_details ? ":":"") +
+ li_end +
+ (show_details ? ShowServiceDetails (service_id):"") +
+ "\n";
}
});
// Additional (unknown) ports, services, protocols...
@@ -178,11 +251,11 @@
return ret_val;
}
- string SummaryZoneBody (string zone_id) {
+ string SummaryZoneBody (string zone_id, boolean show_details) {
return
ul_start + "\n" +
- SummaryInterfacesInZone(zone_id) +
- SummaryOpenServicesInZone(zone_id) +
+ SummaryInterfacesInZone (zone_id) +
+ SummaryOpenServicesInZone (zone_id, show_details) +
ul_end + "\n";
}
@@ -280,6 +353,12 @@
}
string InitBoxSummary (list <string> for_zones) {
+ show_details = SuSEFirewallUI::GetShowSummaryDetails();
+ y2milestone ("Regenerating summary dialog, details: %1", show_details);
+
+ // just as first init
+ UI::ChangeWidget (`id ("show_details"), `Value, show_details);
+
string summary = SummaryFirewallStart();
summary = summary + SummaryUnassignedInterfaces();
@@ -289,8 +368,8 @@
foreach (string zone_id, SuSEFirewall::GetKnownFirewallZones(), {
if (contains(for_zones,zone_id)) {
summary = summary
- + SummaryZoneHeader(zone_id)
- + SummaryZoneBody(zone_id);
+ + SummaryZoneHeader (zone_id)
+ + SummaryZoneBody (zone_id, show_details);
}
});
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-firewall-2.15.3/src/SuSEFirewallUI.ycp new/yast2-firewall-2.15.4/src/SuSEFirewallUI.ycp
--- old/yast2-firewall-2.15.3/src/SuSEFirewallUI.ycp 2006-10-09 17:14:35.000000000 +0200
+++ new/yast2-firewall-2.15.4/src/SuSEFirewallUI.ycp 2007-03-06 15:47:46.000000000 +0100
@@ -16,5 +16,29 @@
global boolean simple_text_output = false;
+ /**
+ * Show details in the summary dialog?
+ * Internal variable.
+ */
+ boolean show_summary_details = false;
+
+ /**
+ * Returns whether summary should be more detailed.
+ *
+ * @return boolean show detailed summary
+ */
+ global boolean GetShowSummaryDetails () {
+ return show_summary_details;
+ }
+
+ /**
+ * Sets whether summary should be more detailed.
+ *
+ * @param boolean show detailed summary
+ */
+ global void SetShowSummaryDetails (boolean set_show) {
+ if (set_show != nil) show_summary_details = set_show;
+ }
+
/* EOF */
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-firewall-2.15.3/src/uifunctions.ycp new/yast2-firewall-2.15.4/src/uifunctions.ycp
--- old/yast2-firewall-2.15.3/src/uifunctions.ycp 2007-02-27 14:58:06.000000000 +0100
+++ new/yast2-firewall-2.15.4/src/uifunctions.ycp 2007-04-02 13:38:24.000000000 +0200
@@ -4,7 +4,7 @@
* Summary: Configuration dialogs handling functions
* Authors: Lukas Ocilka
*
- * $Id: uifunctions.ycp 36543 2007-02-27 13:58:04Z locilka $
+ * $Id: uifunctions.ycp 37247 2007-04-02 11:38:22Z locilka $
*
* Configuration dialogs handling.
* Both Expert and Simple.
@@ -28,6 +28,7 @@
include "firewall/generalfunctions.ycp";
include "firewall/helps.ycp";
+ include "firewall/subdialogs.ycp";
// GLOBAL UI CONFIGURATION
term all_popup_definition = `opt(`decorated,`centered);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-firewall-2.15.3/VERSION new/yast2-firewall-2.15.4/VERSION
--- old/yast2-firewall-2.15.3/VERSION 2007-02-28 15:33:15.000000000 +0100
+++ new/yast2-firewall-2.15.4/VERSION 2007-04-02 13:38:08.000000000 +0200
@@ -1 +1 @@
-2.15.3
+2.15.4
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org