3 commits - rel-eng/packages reporting/reports reporting/spacewalk-reports.spec
by StephenHerr
rel-eng/packages/spacewalk-reports | 2
reporting/reports/data/cloned-channels | 27 +++++++
reporting/reports/data/host-guests | 26 ++++++
reporting/reports/data/splice-export | 124 +++++++++++++++++++++++++++++++++
reporting/spacewalk-reports.spec | 6 +
5 files changed, 183 insertions(+), 2 deletions(-)
New commits:
commit 779c25e48777bb1f7e580bacc83a505f7fb2271c
Author: Stephen Herr <sherr(a)redhat.com>
Date: Fri May 24 15:25:59 2013 -0400
Automatic commit of package [spacewalk-reports] release [1.10.6-1].
diff --git a/rel-eng/packages/spacewalk-reports b/rel-eng/packages/spacewalk-reports
index f6282b4..beb374a 100644
--- a/rel-eng/packages/spacewalk-reports
+++ b/rel-eng/packages/spacewalk-reports
@@ -1 +1 @@
-1.10.5-1 reporting/
+1.10.6-1 reporting/
diff --git a/reporting/spacewalk-reports.spec b/reporting/spacewalk-reports.spec
index b7af14d..8710e8d 100644
--- a/reporting/spacewalk-reports.spec
+++ b/reporting/spacewalk-reports.spec
@@ -2,7 +2,7 @@ Name: spacewalk-reports
Summary: Script based reporting
Group: Applications/Internet
License: GPLv2
-Version: 1.10.5
+Version: 1.10.6
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -43,6 +43,10 @@ rm -rf $RPM_BUILD_ROOT
%doc COPYING
%changelog
+* Fri May 24 2013 Stephen Herr <sherr(a)redhat.com> 1.10.6-1
+- Report for host-guest mappings for splice integration
+- Reports to support enhanced reporting
+
* Tue May 07 2013 Jan Pazdziora 1.10.5-1
- report patterns should have 644 in git
- deploying /data/* content with 644 instead 755
commit 76e5c0606408fe1f7a1f373cd742000ea58b8e5c
Author: Christopher Duryee <cduryee(a)redhat.com>
Date: Fri May 24 15:25:18 2013 -0400
Report for host-guest mappings for splice integration
diff --git a/reporting/reports/data/host-guests b/reporting/reports/data/host-guests
new file mode 100644
index 0000000..3057cc0
--- /dev/null
+++ b/reporting/reports/data/host-guests
@@ -0,0 +1,26 @@
+synopsis:
+
+ Host-Guest mapping
+
+description:
+
+ List all systems, along with their guests
+
+columns:
+
+ server_id System identifier
+ guests Guests
+
+multival_columns:
+
+ server_id
+ guests : guests
+
+sql:
+
+ select host_system_id as server_id,
+ virtual_system_id as guests
+ from rhnvirtualinstance
+ where host_system_id is not null
+ and virtual_system_id is not null
+ order by server_id;
commit 99dd3e491a435c035e5f3174436218beffd6b5c0
Author: James Slagle <jslagle(a)redhat.com>
Date: Fri May 24 15:16:00 2013 -0400
Reports to support enhanced reporting
diff --git a/reporting/reports/data/cloned-channels b/reporting/reports/data/cloned-channels
new file mode 100644
index 0000000..dc0cd85
--- /dev/null
+++ b/reporting/reports/data/cloned-channels
@@ -0,0 +1,27 @@
+
+synopsis:
+
+ Cloned Channel report
+
+description:
+
+ List of cloned channels in the server with their original channel.
+
+columns:
+
+ original_channel_label Original channel label
+ original_channel_name Original channel name
+ new_channel_label Channel label
+ new_channel_name Channel name
+
+sql:
+
+ select oc.label original_channel_label,
+ oc.name original_channel_name,
+ nc.label new_channel_label,
+ nc.name new_channel_name
+ from rhnchannelcloned cc,
+ rhnchannel oc,
+ rhnchannel nc
+ where cc.original_id = oc.id
+ and cc.id = nc.id
diff --git a/reporting/reports/data/splice-export b/reporting/reports/data/splice-export
new file mode 100644
index 0000000..9e487d2
--- /dev/null
+++ b/reporting/reports/data/splice-export
@@ -0,0 +1,124 @@
+
+synopsis:
+
+ System data needed for splice integration for enhanced reporting.
+
+description:
+
+ List of systems registered to the server, together with
+ various hardware and software information used for enhanced reporting.
+ The structure of this report can change as needed in future releases
+ of spacewalk-reports.
+
+columns:
+
+ server_id:i System identifier
+ organization Organization
+ org_id Organization ID
+ name System Name
+ hostname Hostname, as reported by the system
+ ip_address IPv4 address, as reported by the system
+ ipv6_address IPv6 address, as reported by the system
+ registered_by User under which the system is registered
+ registration_time Registration time
+ last_checkin_time Last checkin time
+ software_channel List of channels to which the system is registered
+ entitlements List of entitlements
+ system_group List of system group to which the system belongs
+ virtual_host:i System identifier of host, if system is a guest
+ architecture Architecture of the system
+ hardware Hardware information
+ memory Memory info
+ sockets Socket count
+
+multival_columns:
+
+ server_id
+ software_channel : software_channel
+ entitlements : entitlements
+ system_group : system_group
+ virtual_host : virtual_host
+
+sql:
+
+ select server_id, organization, org_id, name, hostname, ip_address, ipv6_address, registered_by,
+ registration_time, last_checkin_time,
+ software_channel,
+ entitlements, system_group, virtual_host, architecture, hardware, memory, sockets
+ from (
+ select rhnserver.id as server_id,
+ rhnserver.name as name,
+ rhnserver.org_id as org_id,
+ rhnservernetwork.hostname, trim(rhnservernetwork.ipaddr) as ip_address,
+ trim(rhnservernetwork.ip6addr) as ipv6_address,
+ ( select login from web_contact where rhnserver.creator_id = web_contact.id ) as registered_by,
+ to_char(rhnserver.created, 'YYYY-MM-DD HH24:MI:SS') as registration_time,
+ ( select to_char(checkin, 'YYYY-MM-DD HH24:MI:SS') from rhnserverinfo where rhnserver.id = server_id ) as last_checkin_time,
+ rhnchannel.label as software_channel,
+ rhnchannel.parent_channel as parent_channel,
+ rhnchannel.id as channel_id,
+ entitlement_data.name as entitlements,
+ entitlement_data.server_group_id as entitlements_server_group_id,
+ group_data.name as system_group,
+ group_data.server_group_id as system_group_server_group_id,
+ (
+ select name from web_customer where rhnserver.org_id = web_customer.id
+ ) as organization,
+ virtual_data.host_system_id as virtual_host,
+ (
+ select rhnserverarch.name from rhnserverarch where rhnserver.server_arch_id = rhnserverarch.id
+ ) as architecture,
+ get_hw_info_as_clob(rhnserver.id, '; ') as hardware,
+ (
+ select rhnram.ram from rhnram where rhnram.server_id = rhnserver.id
+ ) as memory,
+ (
+ select rhncpu.nrsocket from rhncpu where rhncpu.server_id = rhnserver.id
+ ) as sockets
+ from rhnserver left outer join
+ (
+ select server_id, hostname, ipaddr, ip6addr
+ from rhnservernetwork
+ where id in (
+ select min(id)
+ from rhnservernetwork
+ group by server_id
+ )
+ ) rhnservernetwork
+ on rhnserver.id = rhnservernetwork.server_id
+ left outer join rhnserverchannel
+ on rhnserver.id = rhnserverchannel.server_id
+ left outer join rhnchannel
+ on rhnserverchannel.channel_id = rhnchannel.id
+ left outer join rhnserverconfigchannel
+ on rhnserver.id = rhnserverconfigchannel.server_id
+ left outer join rhnconfigchannel
+ on rhnserverconfigchannel.config_channel_id = rhnconfigchannel.id
+ left outer join
+ (
+ select rhnservergroupmembers.server_id, rhnservergroupmembers.server_group_id, rhnservergroup.name
+ from rhnservergroupmembers left outer join rhnservergroup
+ on rhnservergroupmembers.server_group_id = rhnservergroup.id
+ where rhnservergroup.group_type is not null
+ ) entitlement_data
+ on rhnserver.id = entitlement_data.server_id
+ left outer join
+ (
+ select rhnservergroupmembers.server_id, rhnservergroupmembers.server_group_id, rhnservergroup.name
+ from rhnservergroupmembers left outer join rhnservergroup
+ on rhnservergroupmembers.server_group_id = rhnservergroup.id
+ where rhnservergroup.group_type is null
+ ) group_data
+ on rhnserver.id = group_data.server_id
+ left outer join
+ (
+ select host_system_id, virtual_system_id
+ from rhnvirtualinstance
+ where host_system_id is not null
+ ) virtual_data
+ on rhnserver.id = virtual_data.virtual_system_id
+ ) X
+ -- where placeholder
+ order by server_id, parent_channel nulls first, channel_id,
+ entitlements_server_group_id, system_group_server_group_id,
+ virtual_host
10 years, 11 months
Changes to 'refs/tags/spacewalk-java-1.10.81-1'
by Tomas Lestach
Tag 'spacewalk-java-1.10.81-1' created by Tomas Lestach <tlestach(a)redhat.com> at 2013-05-24 15:17 +0000
Tagging package [spacewalk-java] version [1.10.81-1] in directory [java/].
Changes since spacewalk-java-1.10.80-1:
Tomas Lestach (7):
855845 - escaping system name for /rhn/systems/DuplicateIPList.do
855845 - escaping system name for /rhn/systems/SystemCurrency.do
855845 - escaping system name for /rhn/systems/DuplicateSystemsDeleteConfirm.do
855845 - escaping system name for /rhn/systems/VirtualSystemsList.do
855845 - escaping system name for /rhn/systems/entitlements/PhysicalHosts.do
855845 - escaping system name for /rhn/systems/entitlements/FlexGuests.do
Automatic commit of package [spacewalk-java] release [1.10.81-1].
---
java/code/webapp/WEB-INF/pages/systems/duplicate/duplicatesystems.jsp | 2 -
java/code/webapp/WEB-INF/pages/systems/duplicate/duplicatesystemsdelete.jsp | 4 ++
java/code/webapp/WEB-INF/pages/systems/entitlements/flexguests.jsp | 2 -
java/code/webapp/WEB-INF/pages/systems/entitlements/physicalhosts.jsp | 8 ++++-
java/code/webapp/WEB-INF/pages/systems/systemcurrency.jsp | 2 -
java/code/webapp/WEB-INF/pages/systems/virtuallist.jsp | 14 +++++-----
java/spacewalk-java.spec | 11 +++++++
rel-eng/packages/spacewalk-java | 2 -
8 files changed, 31 insertions(+), 14 deletions(-)
---
10 years, 11 months
7 commits - java/code java/spacewalk-java.spec rel-eng/packages
by Tomas Lestach
java/code/webapp/WEB-INF/pages/systems/duplicate/duplicatesystems.jsp | 2 -
java/code/webapp/WEB-INF/pages/systems/duplicate/duplicatesystemsdelete.jsp | 4 ++
java/code/webapp/WEB-INF/pages/systems/entitlements/flexguests.jsp | 2 -
java/code/webapp/WEB-INF/pages/systems/entitlements/physicalhosts.jsp | 8 ++++-
java/code/webapp/WEB-INF/pages/systems/systemcurrency.jsp | 2 -
java/code/webapp/WEB-INF/pages/systems/virtuallist.jsp | 14 +++++-----
java/spacewalk-java.spec | 11 +++++++
rel-eng/packages/spacewalk-java | 2 -
8 files changed, 31 insertions(+), 14 deletions(-)
New commits:
commit 8922a734f43ca1724566d098d88fc758e78ee87d
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Fri May 24 17:17:14 2013 +0200
Automatic commit of package [spacewalk-java] release [1.10.81-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index 3aa0b84..9ae8621 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -28,7 +28,7 @@ Name: spacewalk-java
Summary: Spacewalk Java site packages
Group: Applications/Internet
License: GPLv2
-Version: 1.10.80
+Version: 1.10.81
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -751,6 +751,15 @@ fi
%{jardir}/postgresql-jdbc.jar
%changelog
+* Fri May 24 2013 Tomas Lestach <tlestach(a)redhat.com> 1.10.81-1
+- 855845 - escaping system name for /rhn/systems/entitlements/FlexGuests.do
+- 855845 - escaping system name for /rhn/systems/entitlements/PhysicalHosts.do
+- 855845 - escaping system name for /rhn/systems/VirtualSystemsList.do
+- 855845 - escaping system name for
+ /rhn/systems/DuplicateSystemsDeleteConfirm.do
+- 855845 - escaping system name for /rhn/systems/SystemCurrency.do
+- 855845 - escaping system name for /rhn/systems/DuplicateIPList.do
+
* Fri May 24 2013 Tomas Lestach <tlestach(a)redhat.com> 1.10.80-1
- 855845 - escaping system name for
/rhn/systems/details/configuration/DiffFileConfirm.do
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index c21755d..740124e 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-1.10.80-1 java/
+1.10.81-1 java/
commit d8481ad925652114ed5c2a319e48c6b74eb09274
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Fri May 24 16:52:15 2013 +0200
855845 - escaping system name for /rhn/systems/entitlements/FlexGuests.do
diff --git a/java/code/webapp/WEB-INF/pages/systems/entitlements/flexguests.jsp b/java/code/webapp/WEB-INF/pages/systems/entitlements/flexguests.jsp
index 54670e1..b2b41a9 100644
--- a/java/code/webapp/WEB-INF/pages/systems/entitlements/flexguests.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/entitlements/flexguests.jsp
@@ -92,7 +92,7 @@
<bean:message key="sdc.details.overview.unknown"/>
</c:when>
<c:otherwise>
- <c:out value="${current.name}</a>" escapeXml="false" />
+ <c:out value="${current.name}" escapeXml="true" />
</c:otherwise>
</c:choose>
commit b25d655cef5021a17bc9149e5c566325cb9d1212
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Fri May 24 16:49:34 2013 +0200
855845 - escaping system name for /rhn/systems/entitlements/PhysicalHosts.do
diff --git a/java/code/webapp/WEB-INF/pages/systems/entitlements/physicalhosts.jsp b/java/code/webapp/WEB-INF/pages/systems/entitlements/physicalhosts.jsp
index 5bd14fa..9ce55e1 100644
--- a/java/code/webapp/WEB-INF/pages/systems/entitlements/physicalhosts.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/entitlements/physicalhosts.jsp
@@ -37,13 +37,17 @@
<rl:column bound="false"
sortable="false"
headerkey="physicalhosts.jsp.guestsystem">
- <a href="/rhn/systems/details/Overview.do?sid=${current.guestId}">${current.guestName}</a>
+ <a href="/rhn/systems/details/Overview.do?sid=${current.guestId}">
+ <c:out value="${current.guestName}" escapeXml="true" />
+ </a>
</rl:column>
<rl:column bound="false" sortable="false" headerkey="guestslimited.jsp.hostsystem">
<c:choose>
<c:when test="${empty current.hostId}">unknown</c:when>
<c:otherwise>
- <a href="/rhn/systems/details/Overview.do?sid=${current.hostId}">${current.hostName}</a>
+ <a href="/rhn/systems/details/Overview.do?sid=${current.hostId}">
+ <c:out value="${current.hostName}" escapeXml="true" />
+ </a>
</c:otherwise>
</c:choose>
</rl:column>
commit 813fc38f9d6b249270aeb4aafd6a1214d1688ba3
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Fri May 24 16:43:54 2013 +0200
855845 - escaping system name for /rhn/systems/VirtualSystemsList.do
diff --git a/java/code/webapp/WEB-INF/pages/systems/virtuallist.jsp b/java/code/webapp/WEB-INF/pages/systems/virtuallist.jsp
index 55c77f0..d4bfc38 100644
--- a/java/code/webapp/WEB-INF/pages/systems/virtuallist.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/virtuallist.jsp
@@ -41,7 +41,7 @@
<img src="/img/channel_parent_node.gif" />
<bean:message key="virtuallist.jsp.host"/>:
<a href="/rhn/systems/details/Overview.do?sid=${current.hostSystemId}">
- ${current.serverName}
+ <c:out value="${current.serverName}" escapeXml="true" />
</a>
<bean:message key="virtuallist.jsp.hoststatus" arg0="${current.countActiveInstances}" arg1="${current.countTotalInstances}"/>
<c:if test="${current.virtEntitlement != null}">
@@ -53,7 +53,9 @@
<rhn:column header="virtuallist.jsp.name" colspan="4">
<img src="/img/channel_parent_node.gif" />
<bean:message key="virtuallist.jsp.host"/>:
- <span style="color: #808080">${current.serverName}</span>
+ <span style="color: #808080">
+ <c:out value="${current.serverName}" escapeXml="true" />
+ </span>
</rhn:column>
</c:when>
<c:otherwise>
@@ -62,15 +64,15 @@
<img src="/img/channel_child_node.gif" />
<c:choose>
<c:when test="${current.virtualSystemId == null}">
- ${current.name}
+ <c:out value="${current.name}" escapeXml="true" />
</c:when>
<c:when test="${current.accessible}">
<a href="/rhn/systems/details/Overview.do?sid=${current.virtualSystemId}">
- ${current.serverName}
+ <c:out value="${current.serverName}" escapeXml="true" />
</a>
</c:when>
<c:otherwise>
- ${current.serverName}
+ <c:out value="${current.serverName}" escapeXml="true" />
</c:otherwise>
</c:choose>
</rhn:column>
@@ -81,7 +83,7 @@
</rhn:column>
<rhn:column header="virtuallist.jsp.state">
- ${current.stateName}
+ <c:out value="${current.serverName}" escapeXml="true" />
</rhn:column>
<rhn:column header="virtuallist.jsp.channel">
commit 855efb801c8aa0facbf21eee1a18bf9267ed346b
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Fri May 24 16:38:53 2013 +0200
855845 - escaping system name for /rhn/systems/DuplicateSystemsDeleteConfirm.do
diff --git a/java/code/webapp/WEB-INF/pages/systems/duplicate/duplicatesystems.jsp b/java/code/webapp/WEB-INF/pages/systems/duplicate/duplicatesystems.jsp
index 238867d..2444850 100644
--- a/java/code/webapp/WEB-INF/pages/systems/duplicate/duplicatesystems.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/duplicate/duplicatesystems.jsp
@@ -97,7 +97,7 @@
<bean:message key="sdc.details.overview.unknown"/>
</c:when>
<c:otherwise>
- <c:out value="${current.name}</a>" escapeXml="true" />
+ <c:out value="${current.name}" escapeXml="true" />
</c:otherwise>
</c:choose>
</rl:non-expandable>
diff --git a/java/code/webapp/WEB-INF/pages/systems/duplicate/duplicatesystemsdelete.jsp b/java/code/webapp/WEB-INF/pages/systems/duplicate/duplicatesystemsdelete.jsp
index 9c6cb96..3abf1de 100644
--- a/java/code/webapp/WEB-INF/pages/systems/duplicate/duplicatesystemsdelete.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/duplicate/duplicatesystemsdelete.jsp
@@ -32,7 +32,9 @@
headerkey="systemlist.jsp.system"
sortattr="name"
defaultsort="asc">
- <c:out value="<a href=\"/rhn/systems/details/Overview.do?sid=${current.id}\">${current.name}</a>" escapeXml="false" />
+ <a href="/rhn/systems/details/Overview.do?sid=${current.id}">
+ <c:out value="${current.name}" escapeXml="true" />
+ </a>
</rl:column>
<rl:column sortable="false"
attr="lastCheckin"
commit 72e12cab6536bafeec192084827b03fabd079f40
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Fri May 24 16:36:05 2013 +0200
855845 - escaping system name for /rhn/systems/SystemCurrency.do
diff --git a/java/code/webapp/WEB-INF/pages/systems/systemcurrency.jsp b/java/code/webapp/WEB-INF/pages/systems/systemcurrency.jsp
index a3e6d6a..b40949a 100644
--- a/java/code/webapp/WEB-INF/pages/systems/systemcurrency.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/systemcurrency.jsp
@@ -44,7 +44,7 @@
<bean:message key="sdc.details.overview.unknown"/>
</c:when>
<c:otherwise>
- <c:out value="${current.name}</a>" escapeXml="false" />
+ <c:out value="${current.name}" escapeXml="true" />
</c:otherwise>
</c:choose>
</rl:column>
commit 5b281f1905cae84e18fa014c451aec521e757dde
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Fri May 24 16:34:38 2013 +0200
855845 - escaping system name for /rhn/systems/DuplicateIPList.do
diff --git a/java/code/webapp/WEB-INF/pages/systems/duplicate/duplicatesystems.jsp b/java/code/webapp/WEB-INF/pages/systems/duplicate/duplicatesystems.jsp
index 83c4be5..238867d 100644
--- a/java/code/webapp/WEB-INF/pages/systems/duplicate/duplicatesystems.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/duplicate/duplicatesystems.jsp
@@ -97,7 +97,7 @@
<bean:message key="sdc.details.overview.unknown"/>
</c:when>
<c:otherwise>
- <c:out value="${current.name}</a>" escapeXml="false" />
+ <c:out value="${current.name}</a>" escapeXml="true" />
</c:otherwise>
</c:choose>
</rl:non-expandable>
10 years, 11 months
Changes to 'refs/tags/spacewalk-java-1.10.80-1'
by Tomas Lestach
Tag 'spacewalk-java-1.10.80-1' created by Tomas Lestach <tlestach(a)redhat.com> at 2013-05-24 14:27 +0000
Tagging package [spacewalk-java] version [1.10.80-1] in directory [java/].
Changes since spacewalk-schema-1.10.37-1:
Simon Lukasik (16):
Challenge clients to upload result files from the audit
Delete the temp file even when the content is useless
Backend handlers for receiving full SCAP results
Client shall upload full results of the scap.xccdf_eval action
Use opened socket when to assessing file type.
Make sure to only upload XML files
Refactor: Extract function _upload_file().
Upload also full XCCDF results along the OVAL results.
Rewind, after using SAX to parse XML.
Submit the OpenSCAP HTML report as well.
Godforsaken closing <tr> node.
Download of detailed SCAP result files.
Downloaded files shall be logged in debug mode.
Exclude HTML file download from sitemesh.
Only non-HTML files shall be marked as an attachement.
Open HTML Reports in a new window.
Stephen Herr (1):
Revert "947639 - new rhnlib conflicts with old spacewalk-backend"
Tomas Lestach (13):
855845 - escaping system name for /rhn/activationkeys/systems/List.do
855845 - escaping system name for /rhn/systems/details/packages/Packages.do
855845 - escaping system name for /rhn/monitoring/ProbeList.do
855845 - escaping system name for /rhn/systems/details/virtualization/ProvisionVirtualizationWizard.do
855845 - escaping system name for /rhn/systems/details/packages/*.do pages
855845 - escaping system name for /rhn/systems/details/packages/profiles/SyncSystems.do
855845 - escaping system name for /rhn/systems/details/configuration/ConfigChannelList.do
855845 - escaping system name for /rhn/systems/details/configuration/ViewModifyCentralPaths.do
855845 - escaping system name for /rhn/systems/details/configuration/ViewModifySandboxPaths.do
855845 - escaping system name for /rhn/systems/details/configuration/addfiles/ImportFile.do
855845 - escaping system name for /rhn/systems/details/configuration/DiffFile.do
855845 - escaping system name for /rhn/systems/details/configuration/DiffFileConfirm.do
Automatic commit of package [spacewalk-java] release [1.10.80-1].
---
backend/common/rhnException.py | 10
backend/server/action/scap.py | 2
backend/server/handlers/xmlrpc/__init__.py | 2
backend/server/handlers/xmlrpc/scap.py | 104 ++++++++++
backend/server/rhnLib.py | 13 +
client/rhel/rhnlib/rhnlib.spec | 1
client/rhel/spacewalk-oscap/scap.py | 92 +++++++-
java/code/src/com/redhat/rhn/domain/audit/XccdfTestResult.java | 12 +
java/code/src/com/redhat/rhn/frontend/action/configuration/sdc/RankChannelsAction.java | 3
java/code/src/com/redhat/rhn/frontend/action/rhnpackage/BaseSystemPackagesConfirmAction.java | 5
java/code/src/com/redhat/rhn/frontend/action/rhnpackage/PackageIndexAction.java | 3
java/code/src/com/redhat/rhn/frontend/action/systems/audit/ScapDownloadAction.java | 78 +++++++
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 3
java/code/src/com/redhat/rhn/manager/audit/scap/file/ScapFileManager.java | 68 ++++++
java/code/src/com/redhat/rhn/manager/audit/scap/file/ScapResultFile.java | 93 ++++++++
java/code/webapp/WEB-INF/decorators.xml | 1
java/code/webapp/WEB-INF/pages/activationkeys/systems/list.jsp | 6
java/code/webapp/WEB-INF/pages/configuration/sdc/difffile.jsp | 5
java/code/webapp/WEB-INF/pages/configuration/sdc/difffileconfirm.jsp | 5
java/code/webapp/WEB-INF/pages/configuration/sdc/importfile.jsp | 7
java/code/webapp/WEB-INF/pages/configuration/sdc/viewmodifyfilescentral.jsp | 3
java/code/webapp/WEB-INF/pages/configuration/sdc/viewmodifyfilessandbox.jsp | 3
java/code/webapp/WEB-INF/pages/monitoring/probes.jsp | 2
java/code/webapp/WEB-INF/pages/systems/details/audit/xccdfdetails.jsp | 12 +
java/code/webapp/WEB-INF/pages/systems/details/packages/profiles/syncsystem.jsp | 5
java/code/webapp/WEB-INF/pages/systems/details/virtualization/provision/first.jsp | 3
java/code/webapp/WEB-INF/struts-config.xml | 6
java/spacewalk-java.spec | 32 ++-
rel-eng/packages/spacewalk-java | 2
29 files changed, 546 insertions(+), 35 deletions(-)
---
10 years, 11 months
13 commits - java/code java/spacewalk-java.spec rel-eng/packages
by Tomas Lestach
java/code/src/com/redhat/rhn/frontend/action/configuration/sdc/RankChannelsAction.java | 3
java/code/src/com/redhat/rhn/frontend/action/rhnpackage/BaseSystemPackagesConfirmAction.java | 5 -
java/code/src/com/redhat/rhn/frontend/action/rhnpackage/PackageIndexAction.java | 3
java/code/webapp/WEB-INF/pages/activationkeys/systems/list.jsp | 6 +
java/code/webapp/WEB-INF/pages/configuration/sdc/difffile.jsp | 5 -
java/code/webapp/WEB-INF/pages/configuration/sdc/difffileconfirm.jsp | 5 -
java/code/webapp/WEB-INF/pages/configuration/sdc/importfile.jsp | 7 +-
java/code/webapp/WEB-INF/pages/configuration/sdc/viewmodifyfilescentral.jsp | 3
java/code/webapp/WEB-INF/pages/configuration/sdc/viewmodifyfilessandbox.jsp | 3
java/code/webapp/WEB-INF/pages/monitoring/probes.jsp | 2
java/code/webapp/WEB-INF/pages/systems/details/packages/profiles/syncsystem.jsp | 5 -
java/code/webapp/WEB-INF/pages/systems/details/virtualization/provision/first.jsp | 3
java/spacewalk-java.spec | 32 +++++++++-
rel-eng/packages/spacewalk-java | 2
14 files changed, 63 insertions(+), 21 deletions(-)
New commits:
commit 201e37bbd628a787a0daa4ace3abefc576f84d44
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Fri May 24 16:27:00 2013 +0200
Automatic commit of package [spacewalk-java] release [1.10.80-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index 11e0021..3aa0b84 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -28,7 +28,7 @@ Name: spacewalk-java
Summary: Spacewalk Java site packages
Group: Applications/Internet
License: GPLv2
-Version: 1.10.79
+Version: 1.10.80
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -751,6 +751,36 @@ fi
%{jardir}/postgresql-jdbc.jar
%changelog
+* Fri May 24 2013 Tomas Lestach <tlestach(a)redhat.com> 1.10.80-1
+- 855845 - escaping system name for
+ /rhn/systems/details/configuration/DiffFileConfirm.do
+- 855845 - escaping system name for
+ /rhn/systems/details/configuration/DiffFile.do
+- 855845 - escaping system name for
+ /rhn/systems/details/configuration/addfiles/ImportFile.do
+- 855845 - escaping system name for
+ /rhn/systems/details/configuration/ViewModifySandboxPaths.do
+- 855845 - escaping system name for
+ /rhn/systems/details/configuration/ViewModifyCentralPaths.do
+- 855845 - escaping system name for
+ /rhn/systems/details/configuration/ConfigChannelList.do
+- 855845 - escaping system name for
+ /rhn/systems/details/packages/profiles/SyncSystems.do
+- 855845 - escaping system name for /rhn/systems/details/packages/*.do pages
+- 855845 - escaping system name for
+ /rhn/systems/details/virtualization/ProvisionVirtualizationWizard.do
+- 855845 - escaping system name for /rhn/monitoring/ProbeList.do
+- 855845 - escaping system name for /rhn/systems/details/packages/Packages.do
+- 855845 - escaping system name for /rhn/activationkeys/systems/List.do
+- Open HTML Reports in a new window.
+- Only non-HTML files shall be marked as an attachement.
+- Exclude HTML file download from sitemesh.
+- Downloaded files shall be logged in debug mode.
+- Download of detailed SCAP result files.
+- Godforsaken closing <tr> node.
+- use xsd default message instead of custom one
+- man pages branding cleanup + misc branding fixes
+
* Tue May 21 2013 Grant Gainey <ggainey(a)redhat.com> 1.10.79-1
- Provide way to build Eclipse .classpath even in the absence of required jars
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index 13b3903..c21755d 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-1.10.79-1 java/
+1.10.80-1 java/
commit 4dcc7437b3e41a52caa0ed61ccb8955ad480136c
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Fri May 24 15:38:08 2013 +0200
855845 - escaping system name for /rhn/systems/details/configuration/DiffFileConfirm.do
diff --git a/java/code/webapp/WEB-INF/pages/configuration/sdc/difffileconfirm.jsp b/java/code/webapp/WEB-INF/pages/configuration/sdc/difffileconfirm.jsp
index 936fa3e..de5bd3d 100644
--- a/java/code/webapp/WEB-INF/pages/configuration/sdc/difffileconfirm.jsp
+++ b/java/code/webapp/WEB-INF/pages/configuration/sdc/difffileconfirm.jsp
@@ -1,5 +1,6 @@
<%@ taglib uri="http://rhn.redhat.com/rhn" prefix="rhn" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
@@ -13,13 +14,13 @@
<rhn:toolbar base="h2" img="/img/rhn-icon-system.gif" >
<bean:message key="sdcdiffconfirm.jsp.header"
- arg0="${system.name}"/>
+ arg0="${fn:escapeXml(system.name)}"/>
</rhn:toolbar>
<div class="page-summary">
<p>
<bean:message key="sdcdiffconfirm.jsp.summary"
- arg0="${system.name}"/>
+ arg0="${fn:escapeXml(system.name)}"/>
</p>
</div>
commit e99de1fba7d17396f4997a3dcb2eca154f5be1de
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Fri May 24 14:39:34 2013 +0200
855845 - escaping system name for /rhn/systems/details/configuration/DiffFile.do
diff --git a/java/code/webapp/WEB-INF/pages/configuration/sdc/difffile.jsp b/java/code/webapp/WEB-INF/pages/configuration/sdc/difffile.jsp
index 7742ab6..7479c85 100644
--- a/java/code/webapp/WEB-INF/pages/configuration/sdc/difffile.jsp
+++ b/java/code/webapp/WEB-INF/pages/configuration/sdc/difffile.jsp
@@ -1,5 +1,6 @@
<%@ taglib uri="http://rhn.redhat.com/rhn" prefix="rhn" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
@@ -15,13 +16,13 @@
img="/img/rhn-icon-system.gif"
imgAlt="system.common.systemAlt">
<bean:message key="sdcdifffile.jsp.header"
- arg0="${system.name}"/>
+ arg0="${fn:escapeXml(system.name)}"/>
</rhn:toolbar>
<div class="page-summary">
<p>
<bean:message key="sdcdifffile.jsp.summary"
- arg0="${system.name}"/>
+ arg0="${fn:escapeXml(system.name)}"/>
</p>
</div>
commit f47a33fd2434335b05da7b619589e63a38c14583
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Fri May 24 14:37:23 2013 +0200
855845 - escaping system name for /rhn/systems/details/configuration/addfiles/ImportFile.do
diff --git a/java/code/webapp/WEB-INF/pages/configuration/sdc/importfile.jsp b/java/code/webapp/WEB-INF/pages/configuration/sdc/importfile.jsp
index 2cefc84..bb13303 100644
--- a/java/code/webapp/WEB-INF/pages/configuration/sdc/importfile.jsp
+++ b/java/code/webapp/WEB-INF/pages/configuration/sdc/importfile.jsp
@@ -1,5 +1,6 @@
<%@ taglib uri="http://rhn.redhat.com/rhn" prefix="rhn" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://rhn.redhat.com/tags/config-managment" prefix="cfg" %>
@@ -15,13 +16,13 @@
img="/img/rhn-icon-system.gif"
imgAlt="system.common.systemAlt">
<bean:message key="sdcimportfile.jsp.header"
- arg0="${system.name}"/>
+ arg0="${fn:escapeXml(system.name)}"/>
</rhn:toolbar>
<div class="page-summary">
<p>
<bean:message key="sdcimportfile.jsp.summary"
- arg0="${system.name}"/>
+ arg0="${fn:escapeXml(system.name)}"/>
</p>
</div>
@@ -43,7 +44,7 @@
</table>
<h2><bean:message key="sdcimportfile.jsp.existing"/></h2>
<p><bean:message key="sdcimportfile.jsp.oldsummary"
- arg0="${system.name}"/></p>
+ arg0="${fn:escapeXml(system.name)}"/></p>
<rhn:list pageList="${requestScope.pageList}"
noDataText="sdcimportfile.jsp.noFiles">
commit 9f6ad210da7f0bd5e9be8ae8d9eb54f39090ad6c
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Fri May 24 14:33:08 2013 +0200
855845 - escaping system name for /rhn/systems/details/configuration/ViewModifySandboxPaths.do
diff --git a/java/code/webapp/WEB-INF/pages/configuration/sdc/viewmodifyfilessandbox.jsp b/java/code/webapp/WEB-INF/pages/configuration/sdc/viewmodifyfilessandbox.jsp
index 25ec0f2..d307528 100644
--- a/java/code/webapp/WEB-INF/pages/configuration/sdc/viewmodifyfilessandbox.jsp
+++ b/java/code/webapp/WEB-INF/pages/configuration/sdc/viewmodifyfilessandbox.jsp
@@ -2,6 +2,7 @@
<%@ taglib uri="http://rhn.redhat.com/tags/list" prefix="rl" %>
<%@ taglib uri="http://rhn.redhat.com/tags/config-managment" prefix="cfg" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<head>
<meta name="name" value="sdc.config.jsp.header" />
@@ -11,7 +12,7 @@
<h2><img class="h2-image" src="${cfg:channelHeaderIcon('sandbox')}"/>
<bean:message key="sdc.config.header.overview"/></h2>
<p><bean:message key="sdc.config.file_list.sandbox_description"
- arg0="${requestScope.system.name}"
+ arg0="${fn:escapeXml(requestScope.system.name)}"
arg1="${rhn:localize('sdc.config.file_list.copy_to_global')}"/></p>
<rl:listset name="fileSet">
commit dd41b4ae25ac864d6d31b1e232a40714235b39fe
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Fri May 24 14:28:01 2013 +0200
855845 - escaping system name for /rhn/systems/details/configuration/ViewModifyCentralPaths.do
diff --git a/java/code/webapp/WEB-INF/pages/configuration/sdc/viewmodifyfilescentral.jsp b/java/code/webapp/WEB-INF/pages/configuration/sdc/viewmodifyfilescentral.jsp
index 4b7dc3f..15cf352 100644
--- a/java/code/webapp/WEB-INF/pages/configuration/sdc/viewmodifyfilescentral.jsp
+++ b/java/code/webapp/WEB-INF/pages/configuration/sdc/viewmodifyfilescentral.jsp
@@ -2,6 +2,7 @@
<%@ taglib uri="http://rhn.redhat.com/tags/list" prefix="rl" %>
<%@ taglib uri="http://rhn.redhat.com/tags/config-managment" prefix="cfg" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<head>
<meta name="name" value="sdc.config.jsp.header" />
@@ -13,7 +14,7 @@
<bean:message key="sdc.config.header.overview"/></h2>
<p>
<bean:message key="sdc.config.file_list.central_description"
- arg0="${requestScope.system.name}"/>
+ arg0="${fn:escapeXml(requestScope.system.name)}"/>
</p>
<rl:listset name="fileSet">
commit 56b0dc6ca566eb3976fa01ddac81698cf4ecac36
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Fri May 24 13:30:05 2013 +0200
855845 - escaping system name for /rhn/systems/details/configuration/ConfigChannelList.do
diff --git a/java/code/src/com/redhat/rhn/frontend/action/configuration/sdc/RankChannelsAction.java b/java/code/src/com/redhat/rhn/frontend/action/configuration/sdc/RankChannelsAction.java
index f008d79..f8f9c83 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/configuration/sdc/RankChannelsAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/configuration/sdc/RankChannelsAction.java
@@ -15,6 +15,7 @@
package com.redhat.rhn.frontend.action.configuration.sdc;
import com.redhat.rhn.common.localization.LocalizationService;
+import com.redhat.rhn.common.util.StringUtil;
import com.redhat.rhn.domain.config.ConfigChannel;
import com.redhat.rhn.domain.rhnset.RhnSet;
import com.redhat.rhn.domain.server.Server;
@@ -114,7 +115,7 @@ public class RankChannelsAction extends BaseRankChannels {
LocalizationService.getInstance().getMessage("snapshots.configchannel");
SystemManager.snapshotServer(server, message);
- String[] params = {server.getName()};
+ String[] params = {StringUtil.htmlifyText(server.getName())};
getStrutsDelegate().saveMessage("sdc.config.rank.jsp.success",
params, request);
return getStrutsDelegate().forwardParam(mapping.findForward("success"),
commit 048fd3843294b7a81d5aec625ef0485fce169815
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Fri May 24 13:13:29 2013 +0200
855845 - escaping system name for /rhn/systems/details/packages/profiles/SyncSystems.do
diff --git a/java/code/webapp/WEB-INF/pages/systems/details/packages/profiles/syncsystem.jsp b/java/code/webapp/WEB-INF/pages/systems/details/packages/profiles/syncsystem.jsp
index 0ac8da5..f67a0cb 100644
--- a/java/code/webapp/WEB-INF/pages/systems/details/packages/profiles/syncsystem.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/details/packages/profiles/syncsystem.jsp
@@ -1,5 +1,6 @@
<%@ taglib uri="http://rhn.redhat.com/rhn" prefix="rhn" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://rhn.redhat.com/tags/list" prefix="rl" %>
@@ -18,8 +19,8 @@
<rhn:csrf />
<div class="page-summary">
<bean:message key="schedulesync.jsp.pagesummary"
- arg0="${requestScope.system.name}"
- arg1="${requestScope.system1.name}" />
+ arg0="${fn:escapeXml(requestScope.system.name)}"
+ arg1="${fn:escapeXml(requestScope.system1.name)}" />
</div>
<rl:list width="100%"
commit 00a4583a66393df4756b21d6a7469740f1c9bb4f
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Fri May 24 12:01:06 2013 +0200
855845 - escaping system name for /rhn/systems/details/packages/*.do pages
diff --git a/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/BaseSystemPackagesConfirmAction.java b/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/BaseSystemPackagesConfirmAction.java
index e0e3bd5..2aab397 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/BaseSystemPackagesConfirmAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/BaseSystemPackagesConfirmAction.java
@@ -17,6 +17,7 @@ package com.redhat.rhn.frontend.action.rhnpackage;
import com.redhat.rhn.common.localization.LocalizationService;
import com.redhat.rhn.common.util.DatePicker;
+import com.redhat.rhn.common.util.StringUtil;
import com.redhat.rhn.domain.action.rhnpackage.PackageAction;
import com.redhat.rhn.domain.server.Server;
import com.redhat.rhn.domain.user.User;
@@ -219,7 +220,7 @@ public abstract class BaseSystemPackagesConfirmAction extends RhnAction {
.formatNumber(numPackages),
pa.getId().toString(),
sid.toString(),
- server.getName()));
+ StringUtil.htmlifyText(server.getName())));
}
else {
msgs.add(ActionMessages.GLOBAL_MESSAGE,
@@ -228,7 +229,7 @@ public abstract class BaseSystemPackagesConfirmAction extends RhnAction {
.formatNumber(numPackages),
pa.getId().toString(),
sid.toString(),
- server.getName()));
+ StringUtil.htmlifyText(server.getName())));
}
strutsDelegate.saveMessages(request, msgs);
Map params = new HashMap();
commit d91730dd6f262c535afd749cae99a4c939997c03
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Fri May 24 11:54:18 2013 +0200
855845 - escaping system name for /rhn/systems/details/virtualization/ProvisionVirtualizationWizard.do
diff --git a/java/code/webapp/WEB-INF/pages/systems/details/virtualization/provision/first.jsp b/java/code/webapp/WEB-INF/pages/systems/details/virtualization/provision/first.jsp
index 79a699a..4cb272c 100644
--- a/java/code/webapp/WEB-INF/pages/systems/details/virtualization/provision/first.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/details/virtualization/provision/first.jsp
@@ -1,4 +1,5 @@
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://rhn.redhat.com/rhn" prefix="rhn" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
@@ -23,7 +24,7 @@ function setStep(stepName) {
<br/>
<div class="page-summary">
<p>
- <bean:message key="virtualization.provision.first.jsp.summary1" arg0="${system.id}" arg1="${system.name}" />
+ <bean:message key="virtualization.provision.first.jsp.summary1" arg0="${system.id}" arg1="${fn:escapeXml(system.name)}" />
</p>
</div>
commit 8bb977eaac051b87ccf5f12db716c78216dd38e1
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Fri May 24 11:22:17 2013 +0200
855845 - escaping system name for /rhn/monitoring/ProbeList.do
diff --git a/java/code/webapp/WEB-INF/pages/monitoring/probes.jsp b/java/code/webapp/WEB-INF/pages/monitoring/probes.jsp
index 52b25c6..4a5e366 100644
--- a/java/code/webapp/WEB-INF/pages/monitoring/probes.jsp
+++ b/java/code/webapp/WEB-INF/pages/monitoring/probes.jsp
@@ -34,7 +34,7 @@
<%@ include file="/WEB-INF/pages/common/fragments/probes/probe-state-column.jspf" %>
<rhn:column header="systemlist.jsp.system">
<A HREF="/rhn/systems/details/probes/ProbesList.do?sid=${current.serverId}">
- ${current.serverName}
+ <c:out value="${current.serverName}" escapeXml="true" />
</A>
</rhn:column>
<rhn:column header="probes.index.jsp.description">
commit 144c4b4b236bd2e6a6ac6c75038ac131d4df3cd6
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Fri May 24 09:59:01 2013 +0200
855845 - escaping system name for /rhn/systems/details/packages/Packages.do
diff --git a/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/PackageIndexAction.java b/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/PackageIndexAction.java
index 6cd728b..ef3fa66 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/PackageIndexAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/rhnpackage/PackageIndexAction.java
@@ -14,6 +14,7 @@
*/
package com.redhat.rhn.frontend.action.rhnpackage;
+import com.redhat.rhn.common.util.StringUtil;
import com.redhat.rhn.domain.action.rhnpackage.PackageAction;
import com.redhat.rhn.domain.server.Server;
import com.redhat.rhn.domain.user.User;
@@ -72,7 +73,7 @@ public class PackageIndexAction extends LookupDispatchAction {
Object[] args = new Object[3];
args[0] = pa.getId().toString();
args[1] = sid.toString();
- args[2] = server.getName();
+ args[2] = StringUtil.htmlifyText(server.getName());
msg.add(ActionMessages.GLOBAL_MESSAGE,
new ActionMessage("message.packagerefresh", args));
commit 5bf789d6049346c852570dc2e19e47c7c8268944
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Fri May 24 09:19:56 2013 +0200
855845 - escaping system name for /rhn/activationkeys/systems/List.do
diff --git a/java/code/webapp/WEB-INF/pages/activationkeys/systems/list.jsp b/java/code/webapp/WEB-INF/pages/activationkeys/systems/list.jsp
index 8082ec3..a0b04ad 100644
--- a/java/code/webapp/WEB-INF/pages/activationkeys/systems/list.jsp
+++ b/java/code/webapp/WEB-INF/pages/activationkeys/systems/list.jsp
@@ -39,10 +39,12 @@
sortattr="name" filterattr="name">
<c:choose>
<c:when test = "${not empty requestScope.accessMap[current.id]}">
- <a href="/rhn/systems/details/Overview.do?sid=${current.id}">${current.name}</a>
+ <a href="/rhn/systems/details/Overview.do?sid=${current.id}">
+ <c:out value="${current.name}" escapeXml="true" />
+ </a>
</c:when>
<c:otherwise>
- ${current.name}
+ <c:out value="${current.name}" escapeXml="true" />
</c:otherwise>
</c:choose>
</rl:column>
10 years, 11 months
16 commits - backend/common backend/server client/rhel java/code
by Šimon Lukašík
backend/common/rhnException.py | 10
backend/server/action/scap.py | 2
backend/server/handlers/xmlrpc/__init__.py | 2
backend/server/handlers/xmlrpc/scap.py | 104 ++++++++++
backend/server/rhnLib.py | 13 +
client/rhel/spacewalk-oscap/scap.py | 92 +++++++-
java/code/src/com/redhat/rhn/domain/audit/XccdfTestResult.java | 12 +
java/code/src/com/redhat/rhn/frontend/action/systems/audit/ScapDownloadAction.java | 78 +++++++
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 3
java/code/src/com/redhat/rhn/manager/audit/scap/file/ScapFileManager.java | 68 ++++++
java/code/src/com/redhat/rhn/manager/audit/scap/file/ScapResultFile.java | 93 ++++++++
java/code/webapp/WEB-INF/decorators.xml | 1
java/code/webapp/WEB-INF/pages/systems/details/audit/xccdfdetails.jsp | 12 +
java/code/webapp/WEB-INF/struts-config.xml | 6
14 files changed, 483 insertions(+), 13 deletions(-)
New commits:
commit 39b532a41612985fdbb9db8d93c0e90a53bc7558
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Thu May 23 15:59:12 2013 +0200
Open HTML Reports in a new window.
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/audit/ScapDownloadAction.java b/java/code/src/com/redhat/rhn/frontend/action/systems/audit/ScapDownloadAction.java
index b9db5a9..56d68fe 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/audit/ScapDownloadAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/audit/ScapDownloadAction.java
@@ -69,7 +69,7 @@ public class ScapDownloadAction extends DownloadAction {
ScapResultFile file = new ScapResultFile(testResult, filename);
log.debug("Serving " + file);
- if (!file.isHTML()) {
+ if (!file.getHTML()) {
response.setHeader("Content-Disposition", "attachment; filename=" + filename);
}
return file;
diff --git a/java/code/src/com/redhat/rhn/manager/audit/scap/file/ScapResultFile.java b/java/code/src/com/redhat/rhn/manager/audit/scap/file/ScapResultFile.java
index c385370..d70f925 100644
--- a/java/code/src/com/redhat/rhn/manager/audit/scap/file/ScapResultFile.java
+++ b/java/code/src/com/redhat/rhn/manager/audit/scap/file/ScapResultFile.java
@@ -55,7 +55,7 @@ public class ScapResultFile implements StreamInfo {
* Query if the format of the given file is HTML.
* @return answer
*/
- public Boolean isHTML() {
+ public Boolean getHTML() {
return filename.endsWith(".html");
}
@@ -66,7 +66,7 @@ public class ScapResultFile implements StreamInfo {
if (filename.endsWith(".xml")) {
return "text/xml";
}
- else if (isHTML()) {
+ else if (getHTML()) {
return "text/html";
}
else {
diff --git a/java/code/webapp/WEB-INF/pages/systems/details/audit/xccdfdetails.jsp b/java/code/webapp/WEB-INF/pages/systems/details/audit/xccdfdetails.jsp
index 78000c4..f22ddb1 100644
--- a/java/code/webapp/WEB-INF/pages/systems/details/audit/xccdfdetails.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/details/audit/xccdfdetails.jsp
@@ -88,8 +88,8 @@
<th><bean:message key="system.audit.xccdfdetails.jsp.files"/>:</th>
<td>
<c:forEach items="${testResult.files}" var="file">
- <a href="/rhn/systems/details/audit/ScapResultDownload.do?sid=${param.sid}&xid=${param.xid}&name=${file.filename}"><c:out value="${file.filename}"/></a>
-
+ <a href="/rhn/systems/details/audit/ScapResultDownload.do?sid=${param.sid}&xid=${param.xid}&name=${file.filename}"
+ target="${file.HTML ? '_blank' : '_self'}"><c:out value="${file.filename}"/></a>
</c:forEach>
</td>
</tr>
commit 54aea31c301413a0254132cfeb3c51a59238c480
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Thu May 23 13:59:37 2013 +0200
Only non-HTML files shall be marked as an attachement.
HTML files (OpenSCAP SCAN Report) shall be opened directly
in the firefox. Non HTML files should be served as an attachement
offering users the save-as dialog.
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/audit/ScapDownloadAction.java b/java/code/src/com/redhat/rhn/frontend/action/systems/audit/ScapDownloadAction.java
index ef7ef38..b9db5a9 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/audit/ScapDownloadAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/audit/ScapDownloadAction.java
@@ -69,7 +69,9 @@ public class ScapDownloadAction extends DownloadAction {
ScapResultFile file = new ScapResultFile(testResult, filename);
log.debug("Serving " + file);
- response.setHeader("Content-Disposition", "attachment; filename=" + filename);
+ if (!file.isHTML()) {
+ response.setHeader("Content-Disposition", "attachment; filename=" + filename);
+ }
return file;
}
diff --git a/java/code/src/com/redhat/rhn/manager/audit/scap/file/ScapResultFile.java b/java/code/src/com/redhat/rhn/manager/audit/scap/file/ScapResultFile.java
index 61e3239..c385370 100644
--- a/java/code/src/com/redhat/rhn/manager/audit/scap/file/ScapResultFile.java
+++ b/java/code/src/com/redhat/rhn/manager/audit/scap/file/ScapResultFile.java
@@ -52,13 +52,21 @@ public class ScapResultFile implements StreamInfo {
}
/**
+ * Query if the format of the given file is HTML.
+ * @return answer
+ */
+ public Boolean isHTML() {
+ return filename.endsWith(".html");
+ }
+
+ /**
* {@inheritDoc}
*/
public String getContentType() {
if (filename.endsWith(".xml")) {
return "text/xml";
}
- else if (filename.endsWith(".html")) {
+ else if (isHTML()) {
return "text/html";
}
else {
commit 8b2a36ff58edfff5d1b76e6af9beb117daa5c476
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Thu May 23 13:37:58 2013 +0200
Exclude HTML file download from sitemesh.
diff --git a/java/code/webapp/WEB-INF/decorators.xml b/java/code/webapp/WEB-INF/decorators.xml
index c3a34a0..062ba35 100644
--- a/java/code/webapp/WEB-INF/decorators.xml
+++ b/java/code/webapp/WEB-INF/decorators.xml
@@ -3,6 +3,7 @@
<decorators defaultdir="/WEB-INF/decorators">
<excludes>
<pattern>/img/*</pattern>
+ <pattern>/systems/details/audit/ScapResultDownload.do*</pattern>
</excludes>
<decorator name="layout_c" page="layout_c.jsp">
<pattern>/*</pattern>
commit 97e568f3b532d03762f6a43358e3551c9c125ac2
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Tue May 21 17:21:05 2013 +0200
Downloaded files shall be logged in debug mode.
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/audit/ScapDownloadAction.java b/java/code/src/com/redhat/rhn/frontend/action/systems/audit/ScapDownloadAction.java
index 243d27d..ef7ef38 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/systems/audit/ScapDownloadAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/audit/ScapDownloadAction.java
@@ -17,6 +17,7 @@ package com.redhat.rhn.frontend.action.systems.audit;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import org.apache.log4j.Logger;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.actions.DownloadAction;
@@ -56,6 +57,7 @@ public class ScapDownloadAction extends DownloadAction {
@Override
protected StreamInfo getStreamInfo(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws Exception {
+ Logger log = Logger.getLogger(ScapDownloadAction.class);
RequestContext context = new RequestContext(request);
User user = context.getLoggedInUser();
Long sid = context.getRequiredParam("sid");
@@ -66,6 +68,7 @@ public class ScapDownloadAction extends DownloadAction {
String filename = context.getRequiredParamAsString("name");
ScapResultFile file = new ScapResultFile(testResult, filename);
+ log.debug("Serving " + file);
response.setHeader("Content-Disposition", "attachment; filename=" + filename);
return file;
}
diff --git a/java/code/src/com/redhat/rhn/manager/audit/scap/file/ScapResultFile.java b/java/code/src/com/redhat/rhn/manager/audit/scap/file/ScapResultFile.java
index 4597900..61e3239 100644
--- a/java/code/src/com/redhat/rhn/manager/audit/scap/file/ScapResultFile.java
+++ b/java/code/src/com/redhat/rhn/manager/audit/scap/file/ScapResultFile.java
@@ -72,4 +72,14 @@ public class ScapResultFile implements StreamInfo {
public InputStream getInputStream() throws IOException {
return new FileInputStream(getAbsolutePath());
}
+
+ /**
+ * Get human readable representation of this class
+ * @return string
+ */
+ public String toString() {
+ return this.getClass().getName() +
+ "[path=" + getAbsolutePath() +
+ "]";
+ }
}
commit c0dbdf250e430e53c9935d0319a4a3c566cd2464
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Mon May 20 16:36:20 2013 +0200
Download of detailed SCAP result files.
diff --git a/java/code/src/com/redhat/rhn/domain/audit/XccdfTestResult.java b/java/code/src/com/redhat/rhn/domain/audit/XccdfTestResult.java
index 7c422c8..70e4668 100644
--- a/java/code/src/com/redhat/rhn/domain/audit/XccdfTestResult.java
+++ b/java/code/src/com/redhat/rhn/domain/audit/XccdfTestResult.java
@@ -15,13 +15,15 @@
package com.redhat.rhn.domain.audit;
import java.util.Date;
+import java.util.List;
import com.redhat.rhn.common.hibernate.HibernateFactory;
import com.redhat.rhn.domain.action.scap.ScapActionDetails;
import com.redhat.rhn.domain.server.Server;
import com.redhat.rhn.manager.audit.ScapManager;
import com.redhat.rhn.manager.audit.scap.RuleResultDiffer;
-
+import com.redhat.rhn.manager.audit.scap.file.ScapFileManager;
+import com.redhat.rhn.manager.audit.scap.file.ScapResultFile;
/**
* XccdfTestResult - Class representation of the table rhnXccdfTestResult.
@@ -216,4 +218,12 @@ public class XccdfTestResult {
}
return diffIcon;
}
+
+ /**
+ * Return a list of detailed SCAP files assigned with this scan run.
+ * @return the result
+ */
+ public List<ScapResultFile> getFiles() {
+ return ScapFileManager.lookupFilesForTestResult(this);
+ }
}
diff --git a/java/code/src/com/redhat/rhn/frontend/action/systems/audit/ScapDownloadAction.java b/java/code/src/com/redhat/rhn/frontend/action/systems/audit/ScapDownloadAction.java
new file mode 100644
index 0000000..243d27d
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/frontend/action/systems/audit/ScapDownloadAction.java
@@ -0,0 +1,73 @@
+/**
+ * Copyright (c) 2013 Red Hat, Inc.
+ *
+ * This software is licensed to you under the GNU General Public License,
+ * version 2 (GPLv2). There is NO WARRANTY for this software, express or
+ * implied, including the implied warranties of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+ * along with this software; if not, see
+ * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+ *
+ * Red Hat trademarks are not licensed under GPLv2. No permission is
+ * granted to use or replicate Red Hat trademarks that are incorporated
+ * in this software or its documentation.
+ */
+package com.redhat.rhn.frontend.action.systems.audit;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionMapping;
+import org.apache.struts.actions.DownloadAction;
+
+import com.redhat.rhn.domain.audit.ScapFactory;
+import com.redhat.rhn.domain.audit.XccdfTestResult;
+import com.redhat.rhn.domain.server.Server;
+import com.redhat.rhn.domain.user.User;
+import com.redhat.rhn.frontend.struts.RequestContext;
+import com.redhat.rhn.manager.audit.scap.file.ScapResultFile;
+import com.redhat.rhn.manager.system.SystemManager;
+
+/**
+ * ScapDownloadAction
+ */
+public class ScapDownloadAction extends DownloadAction {
+/*
+ public ActionForward execute(ActionMapping mapping, ActionForm formIn,
+ HttpServletRequest request,
+ HttpServletResponse response) {
+
+ response.setHeader("Content-
+
+ try {
+ OutputStream
+
+ request.setAttribute("testResult", testResult);
+ request.setAttribute("system", server);
+
+ request.setAttribute(ListTagHelper.PARENT_URL,
+ request.getRequestURI() + "?sid=" + sid + "&xid=" + xid);
+ SdcHelper.ssmCheck(request, sid, user);
+
+ return mapping.findForward(RhnHelper.DEFAULT_FORWARD);
+ }
+*/
+ @Override
+ protected StreamInfo getStreamInfo(ActionMapping mapping, ActionForm form,
+ HttpServletRequest request, HttpServletResponse response) throws Exception {
+ RequestContext context = new RequestContext(request);
+ User user = context.getLoggedInUser();
+ Long sid = context.getRequiredParam("sid");
+ Server server = SystemManager.lookupByIdAndUser(sid, user);
+ Long xid = context.getRequiredParam("xid");
+ XccdfTestResult testResult = ScapFactory.lookupTestResultByIdAndSid(xid,
+ server.getId());
+ String filename = context.getRequiredParamAsString("name");
+ ScapResultFile file = new ScapResultFile(testResult, filename);
+
+ response.setHeader("Content-Disposition", "attachment; filename=" + filename);
+ return file;
+ }
+
+}
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
index 9fa7e91..7662af1 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
@@ -11041,6 +11041,9 @@ the <strong>Red Hat Enterprise Linux System Administration Guide.</stro
<trans-unit id="system.audit.xccdfdetails.jsp.errors">
<source>Scan's Error output</source>
</trans-unit>
+ <trans-unit id="system.audit.xccdfdetails.jsp.files">
+ <source>Detailed Results</source>
+ </trans-unit>
<trans-unit id="system.audit.xccdfdetails.jsp.xccdfrules">
<source>XCCDF Rule Results</source>
</trans-unit>
diff --git a/java/code/src/com/redhat/rhn/manager/audit/scap/file/ScapFileManager.java b/java/code/src/com/redhat/rhn/manager/audit/scap/file/ScapFileManager.java
new file mode 100644
index 0000000..fcd8804
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/manager/audit/scap/file/ScapFileManager.java
@@ -0,0 +1,68 @@
+/**
+ * Copyright (c) 2013 Red Hat, Inc.
+ *
+ * This software is licensed to you under the GNU General Public License,
+ * version 2 (GPLv2). There is NO WARRANTY for this software, express or
+ * implied, including the implied warranties of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+ * along with this software; if not, see
+ * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+ *
+ * Red Hat trademarks are not licensed under GPLv2. No permission is
+ * granted to use or replicate Red Hat trademarks that are incorporated
+ * in this software or its documentation.
+ */
+package com.redhat.rhn.manager.audit.scap.file;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import com.redhat.rhn.common.conf.Config;
+import com.redhat.rhn.common.conf.ConfigDefaults;
+import com.redhat.rhn.domain.audit.XccdfTestResult;
+
+/**
+ * ScapFileManager - Handling of full SCAP results assigned to a rhnXccdfTestResult
+ */
+public class ScapFileManager {
+ private ScapFileManager() {
+ }
+
+ /**
+ * Find SCAP Result files assigned with the given testResult
+ * @param testResult XccdfTestResult
+ * @return the list of files
+ */
+ public static List<ScapResultFile> lookupFilesForTestResult(
+ XccdfTestResult testResult) {
+ List<ScapResultFile> result = new ArrayList<ScapResultFile>();
+ File folder = new File(getStoragePath(testResult));
+ for (File file : folder.listFiles()) {
+ if (file.isFile()) {
+ result.add(new ScapResultFile(testResult, file.getName()));
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Get file path to the storage directory assigned with a given testResult
+ * @param tr TestResult
+ * @return the path
+ */
+ public static String getStoragePath(XccdfTestResult tr) {
+ return Config.get().getString(ConfigDefaults.MOUNT_POINT) +
+ "/" + getStorageRelativePath(tr);
+ }
+
+ private static String getStorageRelativePath(XccdfTestResult tr) {
+ return getActionPath(tr.getServer().getOrg().getId(),
+ tr.getServer().getId(), tr.getScapActionDetails().getParentAction().getId());
+ }
+
+ private static String getActionPath(Long orgId, Long systemId, Long actionId) {
+ // an equivalent of rhnLib.get_action_path()
+ return "systems/" + orgId + "/" + systemId + "/actions/" + actionId;
+ }
+}
diff --git a/java/code/src/com/redhat/rhn/manager/audit/scap/file/ScapResultFile.java b/java/code/src/com/redhat/rhn/manager/audit/scap/file/ScapResultFile.java
new file mode 100644
index 0000000..4597900
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/manager/audit/scap/file/ScapResultFile.java
@@ -0,0 +1,75 @@
+/**
+ * Copyright (c) 2013 Red Hat, Inc.
+ *
+ * This software is licensed to you under the GNU General Public License,
+ * version 2 (GPLv2). There is NO WARRANTY for this software, express or
+ * implied, including the implied warranties of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+ * along with this software; if not, see
+ * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+ *
+ * Red Hat trademarks are not licensed under GPLv2. No permission is
+ * granted to use or replicate Red Hat trademarks that are incorporated
+ * in this software or its documentation.
+ */
+package com.redhat.rhn.manager.audit.scap.file;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.apache.struts.actions.DownloadAction.StreamInfo;
+
+import com.redhat.rhn.domain.audit.XccdfTestResult;
+
+/**
+ * ScapResultFile
+ */
+public class ScapResultFile implements StreamInfo {
+ private XccdfTestResult testResult;
+ private String filename;
+
+ /**
+ * Constructeur
+ * @param testResultIn The XccdfTestResult which is assigned with the given file
+ * @param filenameIn The file name
+ */
+ public ScapResultFile(XccdfTestResult testResultIn, String filenameIn) {
+ testResult = testResultIn;
+ filename = filenameIn;
+ }
+
+ /**
+ * Return the file name of this file
+ * @return the file name
+ */
+ public String getFilename() {
+ return filename;
+ }
+
+ private String getAbsolutePath() {
+ return ScapFileManager.getStoragePath(testResult) + "/" + filename;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getContentType() {
+ if (filename.endsWith(".xml")) {
+ return "text/xml";
+ }
+ else if (filename.endsWith(".html")) {
+ return "text/html";
+ }
+ else {
+ return "application/octet-stream";
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public InputStream getInputStream() throws IOException {
+ return new FileInputStream(getAbsolutePath());
+ }
+}
diff --git a/java/code/webapp/WEB-INF/pages/systems/details/audit/xccdfdetails.jsp b/java/code/webapp/WEB-INF/pages/systems/details/audit/xccdfdetails.jsp
index 5e52a0b..78000c4 100644
--- a/java/code/webapp/WEB-INF/pages/systems/details/audit/xccdfdetails.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/details/audit/xccdfdetails.jsp
@@ -83,6 +83,17 @@
<th><bean:message key="system.audit.xccdfdetails.jsp.errors"/>:</th>
<td><pre><c:out value="${testResult.errrosContents}"/></pre></th>
</tr>
+ <c:if test="${not empty testResult.files}">
+ <tr>
+ <th><bean:message key="system.audit.xccdfdetails.jsp.files"/>:</th>
+ <td>
+ <c:forEach items="${testResult.files}" var="file">
+ <a href="/rhn/systems/details/audit/ScapResultDownload.do?sid=${param.sid}&xid=${param.xid}&name=${file.filename}"><c:out value="${file.filename}"/></a>
+
+ </c:forEach>
+ </td>
+ </tr>
+ </c:if>
</table>
<h2><bean:message key="system.audit.xccdfdetails.jsp.xccdfrules"/></h2>
diff --git a/java/code/webapp/WEB-INF/struts-config.xml b/java/code/webapp/WEB-INF/struts-config.xml
index 272846e..edaad8a 100644
--- a/java/code/webapp/WEB-INF/struts-config.xml
+++ b/java/code/webapp/WEB-INF/struts-config.xml
@@ -2997,6 +2997,12 @@
path="/WEB-INF/pages/systems/details/audit/xccdfdetails.jsp"/>
</action>
+ <action path="/systems/details/audit/ScapResultDownload"
+ scope="request"
+ type="com.redhat.rhn.frontend.action.systems.audit.ScapDownloadAction"
+ className="com.redhat.rhn.frontend.struts.RhnActionMapping">
+ </action>
+
<action path="/systems/details/audit/RuleDetails"
scope="request"
input="/WEB-INF/pages/systems/details/audit/ruledetails.jsp"
commit 9af2e9263d8f6177bfa97c5ad0c897d5b7609a3a
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Mon May 20 10:14:14 2013 +0200
Godforsaken closing <tr> node.
diff --git a/java/code/webapp/WEB-INF/pages/systems/details/audit/xccdfdetails.jsp b/java/code/webapp/WEB-INF/pages/systems/details/audit/xccdfdetails.jsp
index 0b83133..5e52a0b 100644
--- a/java/code/webapp/WEB-INF/pages/systems/details/audit/xccdfdetails.jsp
+++ b/java/code/webapp/WEB-INF/pages/systems/details/audit/xccdfdetails.jsp
@@ -82,6 +82,7 @@
<tr>
<th><bean:message key="system.audit.xccdfdetails.jsp.errors"/>:</th>
<td><pre><c:out value="${testResult.errrosContents}"/></pre></th>
+ </tr>
</table>
<h2><bean:message key="system.audit.xccdfdetails.jsp.xccdfrules"/></h2>
commit b31837cac3bd3e364bd6bbd8f5cc8aa0b992704a
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Tue May 21 16:49:01 2013 +0200
Submit the OpenSCAP HTML report as well.
diff --git a/client/rhel/spacewalk-oscap/scap.py b/client/rhel/spacewalk-oscap/scap.py
index 2ce4726..4caa7cc 100644
--- a/client/rhel/spacewalk-oscap/scap.py
+++ b/client/rhel/spacewalk-oscap/scap.py
@@ -84,7 +84,7 @@ def _popen(args):
def _process_params(args, filename, results_dir=None):
params = ['--results', filename]
if results_dir:
- params += ['--oval-results']
+ params += ['--oval-results', '--report', 'xccdf-report.html']
errors = ''
if args:
allowed_args = {
commit fd631cb7ceb8b451fde9fcecf989f8372bfebad9
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Fri May 17 09:08:51 2013 +0200
Rewind, after using SAX to parse XML.
Otherwise, a subsequent read will go short.
diff --git a/client/rhel/spacewalk-oscap/scap.py b/client/rhel/spacewalk-oscap/scap.py
index 38532f7..2ce4726 100644
--- a/client/rhel/spacewalk-oscap/scap.py
+++ b/client/rhel/spacewalk-oscap/scap.py
@@ -159,7 +159,10 @@ def _cleanup_temp(results_dir):
def _assert_xml(f):
try:
- xml.sax.parse(f, xml.sax.ContentHandler())
- return True
- except:
- return False
+ try:
+ xml.sax.parse(f, xml.sax.ContentHandler())
+ return True
+ except:
+ return False
+ finally:
+ f.seek(0)
commit 85f92dc2942e5c7cc04278cc1c794981a38b186a
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Thu May 16 14:22:44 2013 +0200
Upload also full XCCDF results along the OVAL results.
diff --git a/client/rhel/spacewalk-oscap/scap.py b/client/rhel/spacewalk-oscap/scap.py
index c62a8f2..38532f7 100644
--- a/client/rhel/spacewalk-oscap/scap.py
+++ b/client/rhel/spacewalk-oscap/scap.py
@@ -39,17 +39,18 @@ def xccdf_eval(args, cache_only=None):
return (1, 'oscap tool did not produce valid xml.\n' + oscap_err, {})
ret, resume, xslt_err = _xccdf_resume(results_file.name)
- del(results_file)
if ret != 0 or resume == '':
+ del(results_file)
_cleanup_temp(results_dir)
return (1, 'Problems with extracting resume:\n' + xslt_err, {})
try:
- up_err = _upload_results(results_dir, args)
+ up_err = _upload_results(results_file, results_dir, args)
except:
# An error during the upload must not prevent scan completion
log.log_exception(*sys.exc_info())
up_err = "Upload of detailed results failed. Fatal error in Python code occurred"
+ del(results_file)
_cleanup_temp(results_dir)
return (0, 'openscap scan completed', {
'resume': encodestring(resume),
@@ -110,7 +111,7 @@ def _process_params(args, filename, results_dir=None):
errors += '\n'
return params, errors
-def _upload_results(results_dir, args):
+def _upload_results(xccdf_result, results_dir, args):
errors = ''
if results_dir:
server = rhnserver.RhnServer()
@@ -119,9 +120,14 @@ def _upload_results(results_dir, args):
systemid = up2dateAuth.getSystemId()
for filename in os.listdir(results_dir):
path = os.path.join(results_dir, filename)
- f = open(path, 'r')
+ if path == xccdf_result.name:
+ f = xccdf_result.file
+ filename = "xccdf-results.xml"
+ else:
+ f = open(path, 'r')
errors += _upload_file(server, systemid, args, path, filename, f)
- f.close()
+ if path != xccdf_result.name:
+ f.close()
return errors
def _upload_file(server, systemid, args, path, filename, f):
commit d564f03081d91920fe1b319f5feac81daccf89f0
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Thu May 16 13:40:08 2013 +0200
Refactor: Extract function _upload_file().
diff --git a/client/rhel/spacewalk-oscap/scap.py b/client/rhel/spacewalk-oscap/scap.py
index 6336dbe..c62a8f2 100644
--- a/client/rhel/spacewalk-oscap/scap.py
+++ b/client/rhel/spacewalk-oscap/scap.py
@@ -120,30 +120,32 @@ def _upload_results(results_dir, args):
for filename in os.listdir(results_dir):
path = os.path.join(results_dir, filename)
f = open(path, 'r')
- if not _assert_xml(f):
- log.log_debug('Excluding "%s" file from upload. Not an XML.', path)
- errors += '\nFile "%s" not uploaded. Not an XML file format.', filename
- f.close()
- continue
-
- stat = os.fstat(f.fileno())
- if stat.st_size < args['file_size']:
- try:
- ret = server.scap.upload_result(systemid, args['id'],
+ errors += _upload_file(server, systemid, args, path, filename, f)
+ f.close()
+ return errors
+
+def _upload_file(server, systemid, args, path, filename, f):
+ if not _assert_xml(f):
+ log.log_debug('Excluding "%s" file from upload. Not an XML.', path)
+ return '\nFile "%s" not uploaded. Not an XML file format.', filename
+
+ stat = os.fstat(f.fileno())
+ if stat.st_size < args['file_size']:
+ try:
+ ret = server.scap.upload_result(systemid, args['id'],
{'filename': filename,
'filecontent': encodestring(f.read()),
'content-encoding': 'base64',
})
- if ret and ret['result']:
- log.log_debug('The file %s uploaded successfully.' % filename)
- except up2dateErrors.Error, e:
- log.log_exception(*sys.exc_info())
- errors += '\nFile "%s" not uploaded. %s' % (filename, e)
- else:
- errors += '\nFile "%s" not uploaded. File size (%d B) exceeds the limit.' \
- % (filename, stat.st_size)
- f.close()
- return errors
+ if ret and ret['result']:
+ log.log_debug('The file %s uploaded successfully.' % filename)
+ return ''
+ except up2dateErrors.Error, e:
+ log.log_exception(*sys.exc_info())
+ return '\nFile "%s" not uploaded. %s' % (filename, e)
+ else:
+ return '\nFile "%s" not uploaded. File size (%d B) exceeds the limit.' \
+ % (filename, stat.st_size)
def _cleanup_temp(results_dir):
if results_dir:
commit eba95bdbcb0dfe83007905a9eeeaf8dae606fab2
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Thu May 16 11:40:38 2013 +0200
Make sure to only upload XML files
diff --git a/client/rhel/spacewalk-oscap/scap.py b/client/rhel/spacewalk-oscap/scap.py
index de8fec2..6336dbe 100644
--- a/client/rhel/spacewalk-oscap/scap.py
+++ b/client/rhel/spacewalk-oscap/scap.py
@@ -120,6 +120,12 @@ def _upload_results(results_dir, args):
for filename in os.listdir(results_dir):
path = os.path.join(results_dir, filename)
f = open(path, 'r')
+ if not _assert_xml(f):
+ log.log_debug('Excluding "%s" file from upload. Not an XML.', path)
+ errors += '\nFile "%s" not uploaded. Not an XML file format.', filename
+ f.close()
+ continue
+
stat = os.fstat(f.fileno())
if stat.st_size < args['file_size']:
try:
commit 999fa65d57be9048294bdcdc020bbec220cd3691
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Thu May 16 11:35:40 2013 +0200
Use opened socket when to assessing file type.
diff --git a/client/rhel/spacewalk-oscap/scap.py b/client/rhel/spacewalk-oscap/scap.py
index e5a1f2a..de8fec2 100644
--- a/client/rhel/spacewalk-oscap/scap.py
+++ b/client/rhel/spacewalk-oscap/scap.py
@@ -33,7 +33,7 @@ def xccdf_eval(args, cache_only=None):
if results_dir:
os.chdir(pwd)
- if not _assert_xml(results_file.name):
+ if not _assert_xml(results_file.file):
del(results_file)
_cleanup_temp(results_dir)
return (1, 'oscap tool did not produce valid xml.\n' + oscap_err, {})
@@ -143,14 +143,9 @@ def _cleanup_temp(results_dir):
if results_dir:
shutil.rmtree(results_dir)
-def _assert_xml(filename):
- f = open(filename, 'rb')
+def _assert_xml(f):
try:
- try:
- xml.sax.parse(f, xml.sax.ContentHandler())
- return True
- except:
- return False
- finally:
- f.close()
-
+ xml.sax.parse(f, xml.sax.ContentHandler())
+ return True
+ except:
+ return False
commit af1fdd902a64a6c53477a2025c7003eaad6449ff
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Fri May 10 09:02:48 2013 +0200
Client shall upload full results of the scap.xccdf_eval action
diff --git a/client/rhel/spacewalk-oscap/scap.py b/client/rhel/spacewalk-oscap/scap.py
index 05e6af7..e5a1f2a 100644
--- a/client/rhel/spacewalk-oscap/scap.py
+++ b/client/rhel/spacewalk-oscap/scap.py
@@ -1,11 +1,16 @@
import sys
+import os
import subprocess
import xml.sax
import tempfile
+import shutil
from base64 import encodestring
sys.path.append("/usr/share/rhn/")
from up2date_client import up2dateLog
+from up2date_client import rhnserver
+from up2date_client import up2dateAuth
+from up2date_client import up2dateErrors
__rhnexport__ = [ 'xccdf_eval' ]
@@ -15,21 +20,40 @@ def xccdf_eval(args, cache_only=None):
if cache_only:
return (0, 'no-ops for caching', {})
- results_file = tempfile.NamedTemporaryFile()
- params, oscap_err = _process_params(args['params'], results_file.name)
+ results_dir = None
+ if ('id' in args) and ('file_size' in args) and args['file_size'] > 0:
+ results_dir = tempfile.mkdtemp()
+ pwd = os.getcwd()
+ os.chdir(results_dir)
+
+ results_file = tempfile.NamedTemporaryFile(dir=results_dir)
+ params, oscap_err = _process_params(args['params'], results_file.name, results_dir)
+
oscap_err += _run_oscap(['xccdf', 'eval'] + params + [args['path']])
+ if results_dir:
+ os.chdir(pwd)
if not _assert_xml(results_file.name):
del(results_file)
+ _cleanup_temp(results_dir)
return (1, 'oscap tool did not produce valid xml.\n' + oscap_err, {})
ret, resume, xslt_err = _xccdf_resume(results_file.name)
del(results_file)
if ret != 0 or resume == '':
+ _cleanup_temp(results_dir)
return (1, 'Problems with extracting resume:\n' + xslt_err, {})
+
+ try:
+ up_err = _upload_results(results_dir, args)
+ except:
+ # An error during the upload must not prevent scan completion
+ log.log_exception(*sys.exc_info())
+ up_err = "Upload of detailed results failed. Fatal error in Python code occurred"
+ _cleanup_temp(results_dir)
return (0, 'openscap scan completed', {
'resume': encodestring(resume),
- 'errors': encodestring(oscap_err + xslt_err)
+ 'errors': encodestring(oscap_err + xslt_err + up_err)
})
def _run_oscap(arguments):
@@ -56,8 +80,10 @@ def _popen(args):
return subprocess.Popen(args, bufsize=-1, stdin=subprocess.PIPE,
stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=False)
-def _process_params(args, filename):
+def _process_params(args, filename, results_dir=None):
params = ['--results', filename]
+ if results_dir:
+ params += ['--oval-results']
errors = ''
if args:
allowed_args = {
@@ -84,6 +110,39 @@ def _process_params(args, filename):
errors += '\n'
return params, errors
+def _upload_results(results_dir, args):
+ errors = ''
+ if results_dir:
+ server = rhnserver.RhnServer()
+ # No need to check capabilities. The server supports detailed results
+ # If rhe 'file_size' and 'id' was in supplied in the argument list.
+ systemid = up2dateAuth.getSystemId()
+ for filename in os.listdir(results_dir):
+ path = os.path.join(results_dir, filename)
+ f = open(path, 'r')
+ stat = os.fstat(f.fileno())
+ if stat.st_size < args['file_size']:
+ try:
+ ret = server.scap.upload_result(systemid, args['id'],
+ {'filename': filename,
+ 'filecontent': encodestring(f.read()),
+ 'content-encoding': 'base64',
+ })
+ if ret and ret['result']:
+ log.log_debug('The file %s uploaded successfully.' % filename)
+ except up2dateErrors.Error, e:
+ log.log_exception(*sys.exc_info())
+ errors += '\nFile "%s" not uploaded. %s' % (filename, e)
+ else:
+ errors += '\nFile "%s" not uploaded. File size (%d B) exceeds the limit.' \
+ % (filename, stat.st_size)
+ f.close()
+ return errors
+
+def _cleanup_temp(results_dir):
+ if results_dir:
+ shutil.rmtree(results_dir)
+
def _assert_xml(filename):
f = open(filename, 'rb')
try:
commit 4aa54f32ab198b70ec0deb6559a1adb391996f8d
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Fri May 10 14:24:44 2013 +0200
Backend handlers for receiving full SCAP results
diff --git a/backend/common/rhnException.py b/backend/common/rhnException.py
index ee82eea..6db1316 100644
--- a/backend/common/rhnException.py
+++ b/backend/common/rhnException.py
@@ -234,14 +234,20 @@ maximum membership exceeded"),
4016: _("Invalid revision number"),
4017: _("Cannot compare files of different file type"),
- # 5000 - 5999: crash reporting errors
+ # 5000 - 5999: client content uploading errors
+ # 5000 - 5099: crash reporting errors
5000: _("Crash information is invalid or incomplete"),
5001: _("Crash file information is invalid or incomplete"),
5002: _("Error composing crash directory path"),
5003: _("Error composing crash file path"),
5004: _("Invalid content encoding"),
5005: _("Invalid crash name"),
- 5006: _("Crash reporting is disabled for this organization")
+ 5006: _("Crash reporting is disabled for this organization"),
+ # 5100 - 5199: scap results reporting error
+ 5101: _("SCAP results file transfer is invalid or incomplete"),
+ 5102: _("Error composing directory path for detailed SCAP results"),
+ 5103: _("Error composing file path for detailed SCAP results"),
+ 5104: _("Invalid content encoding"),
}
diff --git a/backend/server/handlers/xmlrpc/__init__.py b/backend/server/handlers/xmlrpc/__init__.py
index 708b4cd..ee2a005 100644
--- a/backend/server/handlers/xmlrpc/__init__.py
+++ b/backend/server/handlers/xmlrpc/__init__.py
@@ -25,6 +25,7 @@ import errata
import proxy
import get_handler
import abrt
+import scap
rpcClasses = {
"registration" : registration.Registration,
@@ -34,6 +35,7 @@ rpcClasses = {
"proxy" : proxy.Proxy,
"servers" : up2date.Servers,
"abrt" : abrt.Abrt,
+ "scap" : scap.Scap,
}
getHandler = get_handler.GetHandler
diff --git a/backend/server/handlers/xmlrpc/scap.py b/backend/server/handlers/xmlrpc/scap.py
new file mode 100644
index 0000000..2a483bf
--- /dev/null
+++ b/backend/server/handlers/xmlrpc/scap.py
@@ -0,0 +1,104 @@
+#
+# Copyright (c) 2013 Red Hat, Inc.
+#
+# This software is licensed to you under the GNU General Public License,
+# version 2 (GPLv2). There is NO WARRANTY for this software, express or
+# implied, including the implied warranties of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+# along with this software; if not, see
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+#
+# Red Hat trademarks are not licensed under GPLv2. No permission is
+# granted to use or replicate Red Hat trademarks that are incorporated
+# in this software or its documentation.
+#
+
+import os
+import stat
+from base64 import decodestring
+
+from spacewalk.common.rhnException import rhnFault
+from spacewalk.common.rhnConfig import CFG
+from spacewalk.common.rhnLog import log_error, log_debug
+from spacewalk.server import rhnSQL
+from spacewalk.server.rhnHandler import rhnHandler
+from spacewalk.server.rhnLib import get_action_path, get_actionfile_path
+
+class Scap(rhnHandler):
+ def __init__(self):
+ rhnHandler.__init__(self)
+ self.functions.append('upload_result')
+
+ def upload_result(self, system_id, action_id, scap_file):
+ self.auth_system(system_id)
+ self._authorize_request(action_id)
+
+ required_keys = ['filename', 'filecontent', 'content-encoding']
+ for k in required_keys:
+ if not scap_file.has_key(k):
+ log_debug(1, self.server_id, "The scap file data is invalid or incomplete: %s" % scap_file)
+ raise rhnFault(5101, "Missing or invalid key: %s" % k)
+
+ return self._store_file(action_id, scap_file)
+
+ def _store_file(self, action_id, scap_file):
+ r_dir = get_action_path(self.server.server['org_id'], self.server_id, action_id)
+ if not r_dir:
+ log_debug(1, self.server_id, "Error composing SCAP action directory path")
+ raise rhnFault(5102)
+ r_file = get_actionfile_path(self.server.server['org_id'], self.server_id, action_id, scap_file['filename'])
+ if not r_file:
+ log_debug(1, self.server_id, "Error composing SCAP action file path")
+ raise rhnFault(5103)
+
+ if not scap_file['content-encoding'] == 'base64':
+ log_debug(1, self.server_id, "Invalid content encoding: %s" % scap_file['content-encoding'])
+ raise rhnFault(5104)
+
+ # Create the file on filer
+ filecontent = decodestring(scap_file['filecontent'])
+ # TODO assert for the size of the file
+
+ absolute_dir = os.path.join(CFG.MOUNT_POINT, r_dir)
+ absolute_file = os.path.join(absolute_dir, scap_file['filename'])
+
+ if not os.path.exists(absolute_dir):
+ log_debug(1, self.server_id, "Creating action directory: %s" % absolute_dir)
+ os.makedirs(absolute_dir)
+ mode = stat.S_IRWXU | stat.S_IRWXG | stat.S_IROTH | stat.S_IXOTH
+ os.chmod(absolute_dir, mode)
+ os.chmod(os.path.dirname(os.path.normpath(absolute_dir)), mode)
+ log_debug(1, self.server_id, "Creating file: %s" % absolute_file)
+ f = open(absolute_file, 'w+')
+ f.write(filecontent)
+ return {'result': True,
+ }
+
+ def _authorize_request(self, action_id):
+ # Make sure that database contains records in
+ # rhnServerAction and rhnActionScap
+ # and not contains records in
+ # rhnXccdfTestResult
+ # for given (system_id, action_id) pair
+ h = rhnSQL.prepare(_query_authorize_request)
+ h.execute(server_id=self.server_id, action_id=action_id)
+ exists = h.fetchone()
+ if len(exists) != 1:
+ raise rhnFault(50, _("Invalid system_id/action_id pair."))
+
+_query_authorize_request = rhnSQL.Statement("""
+select 1
+ from rhnServerAction rsa,
+ rhnActionScap ras
+ where rsa.server_id = :server_id
+ and rsa.action_id = :action_id
+ and rsa.action_id = ras.action_id
+ and rsa.status in (0, 1)
+ and not exists
+ (
+ select rxt.id
+ from rhnXccdfTestresult rxt
+ where rxt.server_id = rsa.server_id
+ and rxt.action_scap_id = ras.id
+ )
+""")
diff --git a/backend/server/rhnLib.py b/backend/server/rhnLib.py
index 50ddb54..75c1a0f 100644
--- a/backend/server/rhnLib.py
+++ b/backend/server/rhnLib.py
@@ -228,3 +228,16 @@ def get_crashfile_path(org_id, system_id, crash, filename):
return path
else:
return None
+
+def get_action_path(org_id, system_id, action_id):
+ """For a given org_id, system_id, and action_id, return relative path to a store directory."""
+ path = os.path.join('systems', str(org_id), str(system_id), 'actions', str(action_id))
+ if _is_secure_path(path):
+ return path
+
+def get_actionfile_path(org_id, system_id, action_id, filename):
+ """For a given org_id, system_id, action_id, and file, return relative path to a file."""
+ path = os.path.join(get_action_path(org_id, system_id, action_id), str(filename))
+
+ if _is_secure_path(path):
+ return path
commit f531866c4d7ab0e951ba98d7b572451f45678c0e
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Thu May 2 16:11:18 2013 +0200
Delete the temp file even when the content is useless
diff --git a/client/rhel/spacewalk-oscap/scap.py b/client/rhel/spacewalk-oscap/scap.py
index 6cd4f6b..05e6af7 100644
--- a/client/rhel/spacewalk-oscap/scap.py
+++ b/client/rhel/spacewalk-oscap/scap.py
@@ -20,6 +20,7 @@ def xccdf_eval(args, cache_only=None):
oscap_err += _run_oscap(['xccdf', 'eval'] + params + [args['path']])
if not _assert_xml(results_file.name):
+ del(results_file)
return (1, 'oscap tool did not produce valid xml.\n' + oscap_err, {})
ret, resume, xslt_err = _xccdf_resume(results_file.name)
commit 04db8531747fd6c256504fcb2657add19d456374
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Thu May 2 14:56:59 2013 +0200
Challenge clients to upload result files from the audit
diff --git a/backend/server/action/scap.py b/backend/server/action/scap.py
index d587a79..c28274b 100644
--- a/backend/server/action/scap.py
+++ b/backend/server/action/scap.py
@@ -33,5 +33,7 @@ def xccdf_eval(server_id, action_id, dry_run=0):
"%s for server %s" % (action_id, server_id))
return ({
'path': dict['path'],
+ 'id': action_id,
+ 'file_size': 2097152,
'params': rhnSQL.read_lob(dict['parameters']) or ''
},)
10 years, 11 months
client/rhel
by StephenHerr
client/rhel/rhnlib/rhnlib.spec | 1 -
1 file changed, 1 deletion(-)
New commits:
commit 15567d2be34fb145e19f38f8d7cb49a285851dfd
Author: Stephen Herr <sherr(a)redhat.com>
Date: Thu May 23 15:12:24 2013 -0400
Revert "947639 - new rhnlib conflicts with old spacewalk-backend"
This reverts commit c79cb9bbc5c4efb8ef46398db37acadb925eaa9e.
See bug 947639 comment 7.
diff --git a/client/rhel/rhnlib/rhnlib.spec b/client/rhel/rhnlib/rhnlib.spec
index e98fc14..917f8e3 100644
--- a/client/rhel/rhnlib/rhnlib.spec
+++ b/client/rhel/rhnlib/rhnlib.spec
@@ -24,7 +24,6 @@ Conflicts: rhn-custom-info < 5.4.7
Conflicts: rhnpush < 5.5.10
Conflicts: rhnclient < 0.10
Conflicts: spacewalk-proxy < 1.3.6
-Conflicts: spacewalk-backend < 1.10.25
%description
rhnlib is a collection of python modules used by the
10 years, 11 months
Changes to 'refs/tags/spacewalk-schema-1.10.37-1'
by Milan Zazrivec
Tag 'spacewalk-schema-1.10.37-1' created by Milan Zazrivec <mzazrivec(a)redhat.com> at 2013-05-23 14:09 +0000
Tagging package [spacewalk-schema] version [1.10.37-1] in directory [schema/spacewalk/].
Changes since spacewalk-admin-1.10.5-1:
Milan Zazrivec (3):
Don't drop rhn_ram_sid_idx if it does not exist.
Don't create index if it already exists
Automatic commit of package [spacewalk-schema] release [1.10.37-1].
---
rel-eng/packages/spacewalk-schema | 2
schema/spacewalk/spacewalk-schema.spec | 6 +-
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/125-alter-index-rhnRam.sql | 29 ++++++++--
3 files changed, 30 insertions(+), 7 deletions(-)
---
10 years, 11 months
rel-eng/packages schema/spacewalk
by Milan Zazrivec
rel-eng/packages/spacewalk-schema | 2 +-
schema/spacewalk/spacewalk-schema.spec | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 6ac9b032994dd5ced04b9e9fc85e41d7f0f0f6d3
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Thu May 23 16:09:33 2013 +0200
Automatic commit of package [spacewalk-schema] release [1.10.37-1].
diff --git a/rel-eng/packages/spacewalk-schema b/rel-eng/packages/spacewalk-schema
index 52de61b..d32a1e2 100644
--- a/rel-eng/packages/spacewalk-schema
+++ b/rel-eng/packages/spacewalk-schema
@@ -1 +1 @@
-1.10.36-1 schema/spacewalk/
+1.10.37-1 schema/spacewalk/
diff --git a/schema/spacewalk/spacewalk-schema.spec b/schema/spacewalk/spacewalk-schema.spec
index 1ac0a3c..fc85653 100644
--- a/schema/spacewalk/spacewalk-schema.spec
+++ b/schema/spacewalk/spacewalk-schema.spec
@@ -4,7 +4,7 @@ Name: spacewalk-schema
Group: Applications/Internet
Summary: Oracle SQL schema for Spacewalk server
-Version: 1.10.36
+Version: 1.10.37
Release: 1%{?dist}
Source0: %{name}-%{version}.tar.gz
@@ -71,6 +71,10 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/spacewalk-sql*
%changelog
+* Thu May 23 2013 Milan Zazrivec <mzazrivec(a)redhat.com> 1.10.37-1
+- Don't create index if it already exists
+- Don't drop rhn_ram_sid_idx if it does not exist.
+
* Tue May 21 2013 Milan Zazrivec <mzazrivec(a)redhat.com> 1.10.36-1
- schema upgrade: don't alter table views
10 years, 11 months
schema/spacewalk
by Milan Zazrivec
schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/125-alter-index-rhnRam.sql | 15 +++++++---
1 file changed, 11 insertions(+), 4 deletions(-)
New commits:
commit 99317e6fdf60d950277842e7818fb46f9a8e0ca0
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Thu May 23 16:08:51 2013 +0200
Don't create index if it already exists
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/125-alter-index-rhnRam.sql b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/125-alter-index-rhnRam.sql
index 9d8104f..18a9522 100644
--- a/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/125-alter-index-rhnRam.sql
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.5-to-spacewalk-schema-1.6/125-alter-index-rhnRam.sql
@@ -16,7 +16,14 @@ exception
end;
/
-CREATE UNIQUE INDEX rhn_ram_sid_uq
- ON rhnRam (server_id)
- TABLESPACE [[4m_tbs]]
- NOLOGGING;
+declare
+ name_already_used exception;
+ pragma exception_init(name_already_used, -00955);
+begin
+ execute immediate 'create unique index rhn_ram_sid_uq on rhnRam(server_id) tablespace [[4m_tbs]] nologging';
+ dbms_output.put_line('Index rhn_ram_sid_uq successfully created.');
+exception
+ when name_already_used then
+ dbms_output.put_line('Index rhn_ram_sid_uq already exists.');
+end;
+/
10 years, 11 months