satellite/install spacewalk/setup
by Jan Pazdziora
satellite/install/install.pl | 2 +-
spacewalk/setup/lib/Spacewalk/Setup.pm | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 48009aef25179002e18a133ce6f9916bced3c6cd
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Apr 10 13:57:27 2012 +0200
To support the whole Unicode with idn_to_ascii, we need to specify utf8.
diff --git a/satellite/install/install.pl b/satellite/install/install.pl
index 03a737c..049ff2d 100755
--- a/satellite/install/install.pl
+++ b/satellite/install/install.pl
@@ -345,7 +345,7 @@ Import values to be used by Satellite [y/n]",
if ($answers->{'rhn-http-proxy'}) {
$answers->{'rhn-http-proxy'} =~ /^([^:\/]*)(:\d+)?/;
- my ($host, $port) = (Net::LibIDN::idn_to_ascii($1), $2);
+ my ($host, $port) = (Net::LibIDN::idn_to_ascii($1, "utf8"), $2);
ask(-question => "HTTP Proxy Port",
-test => qr/\d+/,
diff --git a/spacewalk/setup/lib/Spacewalk/Setup.pm b/spacewalk/setup/lib/Spacewalk/Setup.pm
index 4077275..5e77650 100644
--- a/spacewalk/setup/lib/Spacewalk/Setup.pm
+++ b/spacewalk/setup/lib/Spacewalk/Setup.pm
@@ -192,7 +192,7 @@ sub load_answer_file {
close FH;
}
if ($answers->{'db-host'}) {
- $answers->{'db-host'} = Net::LibIDN::idn_to_ascii($answers->{'db-host'});
+ $answers->{'db-host'} = Net::LibIDN::idn_to_ascii($answers->{'db-host'}, "utf8");
}
return;
}
@@ -748,7 +748,7 @@ REDO_CONNECT:
-default => 'localhost',
-answer => \$answers->{'db-host'});
- $answers->{'db-host'} = Net::LibIDN::idn_to_ascii($answers->{'db-host'});
+ $answers->{'db-host'} = Net::LibIDN::idn_to_ascii($answers->{'db-host'}, "utf8");
$data{'db-name'} = _oracle_make_dsn_string($answers);
if (defined $data{'db-name'}) {
# Try db-name as SID for host (//host:port/name).
@@ -842,7 +842,7 @@ sub postgresql_get_database_answers {
-answer => \$answers->{'db-host'});
if ($answers->{'db-host'} ne '') {
- $answers->{'db-host'} = Net::LibIDN::idn_to_ascii($answers->{'db-host'});
+ $answers->{'db-host'} = Net::LibIDN::idn_to_ascii($answers->{'db-host'}, "utf8");
ask(
-noninteractive => $opts->{"non-interactive"},
-question => "Port",
12 years
spacewalk/setup
by Jan Pazdziora
spacewalk/setup/bin/spacewalk-setup | 1 -
1 file changed, 1 deletion(-)
New commits:
commit 2460573da2e290ac07e4b595ad15499687086d48
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Apr 10 13:54:34 2012 +0200
The spacewalk-setup script does not seem to need Net::LibIDN directly.
diff --git a/spacewalk/setup/bin/spacewalk-setup b/spacewalk/setup/bin/spacewalk-setup
index 80e780e..a5edec7 100755
--- a/spacewalk/setup/bin/spacewalk-setup
+++ b/spacewalk/setup/bin/spacewalk-setup
@@ -30,7 +30,6 @@ use Sys::Hostname ();
use Spacewalk::Setup ();
use Fcntl qw(F_GETFD F_SETFD FD_CLOEXEC);
use IO::Socket ();
-use Net::LibIDN ();
use RHN::DB ();
my $DEBUG;
12 years
3 commits - java/code
by Šimon Lukašík
java/code/src/com/redhat/rhn/common/db/datasource/xml/scap_queries.xml | 37 +
java/code/src/com/redhat/rhn/frontend/action/audit/ListXccdfAction.java | 67 +++
java/code/src/com/redhat/rhn/frontend/dto/XccdfTestResultCounts.java | 189 ++++++++++
java/code/src/com/redhat/rhn/frontend/dto/XccdfTestResultDto.java | 112 +++++
java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml | 6
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 26 +
java/code/src/com/redhat/rhn/manager/audit/ScapManager.java | 14
java/code/webapp/WEB-INF/nav/sitenav-authenticated.xml | 1
java/code/webapp/WEB-INF/pages/audit/listxccdf.jsp | 23 +
java/code/webapp/WEB-INF/pages/common/fragments/audit/xccdf-easy-list.jspf | 38 ++
java/code/webapp/WEB-INF/pages/common/fragments/systems/system_list_fragment.jspf | 3
java/code/webapp/WEB-INF/struts-config.xml | 7
12 files changed, 521 insertions(+), 2 deletions(-)
New commits:
commit ca89dda11630aaed127bdeda894d1140cb7ab893
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Wed Apr 4 13:11:28 2012 +0200
OpenSCAP integration -- view latest results of whole infrastructure
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/scap_queries.xml b/java/code/src/com/redhat/rhn/common/db/datasource/xml/scap_queries.xml
index 3f810df..9e4d8eb 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/scap_queries.xml
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/scap_queries.xml
@@ -32,6 +32,43 @@
</query>
</mode>
+<mode name="latest_testresults_by_user" class="com.redhat.rhn.frontend.dto.XccdfTestResultDto">
+ <elaborator name="testresult_counts"/>
+ <query params="user_id">
+ SELECT
+ tr.id as xid,
+ tr.server_id as sid,
+ s.name as server_name,
+ xp.identifier as profile,
+ sa.completion_time as completed
+ FROM rhnUserServerPerms usp,
+ rhnXccdfTestresult tr,
+ rhnXccdfProfile xp,
+ rhnActionScap ras,
+ rhnServerAction sa,
+ rhnServer s
+ WHERE usp.user_id = :user_id
+ AND usp.server_id = tr.server_id
+ AND sa.server_id = tr.server_id
+ AND tr.action_scap_id = ras.id
+ AND sa.action_id = ras.action_id
+ AND tr.profile_id = xp.id
+ AND s.id = tr.server_id
+ ORDER BY completed DESC
+ </query>
+</mode>
+
+<query name="testresult_counts" multiple="t" column="xid">
+ SELECT tr.id as xid, rrt.label, count(rr.id) as count
+ FROM rhnXccdfTestresult tr,
+ rhnXccdfRuleresult rr,
+ rhnXccdfRuleresultType rrt
+ WHERE tr.id in (%s)
+ AND tr.id = rr.testresult_id
+ AND rr.result_id = rrt.id
+ GROUP BY tr.id, rrt.label
+</query>
+
<mode name="show_ruleresults" class="com.redhat.rhn.frontend.dto.XccdfRuleResultDto">
<query params="xid">
SELECT rr.id, rrt.label, rr.testresult_id as test_result_id
diff --git a/java/code/src/com/redhat/rhn/frontend/action/audit/ListXccdfAction.java b/java/code/src/com/redhat/rhn/frontend/action/audit/ListXccdfAction.java
new file mode 100644
index 0000000..93bf8a7
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/frontend/action/audit/ListXccdfAction.java
@@ -0,0 +1,67 @@
+/**
+ * Copyright (c) 2012 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.audit;
+
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.struts.action.ActionForm;
+import org.apache.struts.action.ActionForward;
+import org.apache.struts.action.ActionMapping;
+
+import com.redhat.rhn.common.db.datasource.DataResult;
+import com.redhat.rhn.domain.user.User;
+import com.redhat.rhn.frontend.struts.RequestContext;
+import com.redhat.rhn.frontend.struts.RhnAction;
+import com.redhat.rhn.frontend.struts.RhnHelper;
+import com.redhat.rhn.frontend.taglibs.list.TagHelper;
+import com.redhat.rhn.frontend.taglibs.list.helper.ListHelper;
+import com.redhat.rhn.frontend.taglibs.list.helper.Listable;
+import com.redhat.rhn.manager.audit.ScapManager;
+
+/**
+ * ListXccdfAction
+ * @version $Rev$
+ */
+
+public class ListXccdfAction extends RhnAction implements Listable {
+
+ /**
+ * {@inheritDoc}
+ */
+ public ActionForward execute(ActionMapping mapping, ActionForm formIn,
+ HttpServletRequest request,
+ HttpServletResponse response) {
+ RequestContext context = new RequestContext(request);
+
+ ListHelper helper = new ListHelper(this, request);
+ helper.execute();
+
+ return mapping.findForward(RhnHelper.DEFAULT_FORWARD);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public List getResult(RequestContext context) {
+ HttpServletRequest request = context.getRequest();
+ User user = context.getLoggedInUser();
+ DataResult results = ScapManager.latestTestResultByUser(user);
+ TagHelper.bindElaboratorTo("groupSet", results.getElaborator(), request);
+ return results;
+ }
+}
diff --git a/java/code/src/com/redhat/rhn/frontend/dto/XccdfTestResultCounts.java b/java/code/src/com/redhat/rhn/frontend/dto/XccdfTestResultCounts.java
new file mode 100644
index 0000000..9cdcd1a
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/frontend/dto/XccdfTestResultCounts.java
@@ -0,0 +1,189 @@
+/**
+ * Copyright (c) 2012 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.dto;
+
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * Simple DTO for transfering data from the DB to the UI through datasource.
+ * @version $Rev$
+ */
+public abstract class XccdfTestResultCounts {
+
+ private static final String PASS_LABEL = "pass";
+ private static final String FAIL_LABEL = "fail";
+ private static final String ERROR_LABEL = "error";
+ private static final String UNKNOWN_LABEL = "unknown";
+ private static final String NOTAPPLICABLE_LABEL = "notapplicable";
+ private static final String NOTCHECKED_LABEL = "notchecked";
+ private static final String NOTSELECTED_LABEL = "notselected";
+ private static final String INFORMATIONAL_LABEL = "informational";
+ private static final String FIXED_LABEL = "fixed";
+
+ private HashMap<String, Long> countMap;
+
+ /* Following properties are set by testresult_counts elaborator. */
+ private List label;
+ private List count;
+
+
+ /**
+ * Returns the list of labels (content of xccdf:result).
+ * @return the result
+ */
+ public List getLabel() {
+ return label;
+ }
+
+ /**
+ * Sets the list of labels (content of xccdf:result).
+ * @param labelIn to set
+ */
+ public void setLabel(List labelIn) {
+ label = labelIn;
+ }
+
+ /**
+ * Returns the list of counts. The count represents a number
+ * of xccdf:rule-result elements per given label.
+ * @return the result
+ */
+ public List getCount() {
+ return count;
+ }
+
+ /**
+ * Sets the list of counts.
+ * @param countIn to set
+ */
+ public void setCount(List countIn) {
+ count = countIn;
+ }
+
+ /**
+ * Get the count of passed rules.
+ * @return count of passed rules
+ */
+ public Long getPass() {
+ return getCountOf(PASS_LABEL);
+ }
+
+ /**
+ * Get the count of failed rules.
+ * @return count of failed rules
+ */
+ public Long getFail() {
+ return getCountOf(FAIL_LABEL);
+ }
+
+ /**
+ * Get the count of errorneous rules.
+ * @return count of errorneous rules
+ */
+ public Long getError() {
+ return getCountOf(ERROR_LABEL);
+ }
+
+ /**
+ * Get the count of rules with unknown result.
+ * @return count of rules with unknown result
+ */
+ public Long getUnknown() {
+ return getCountOf(UNKNOWN_LABEL);
+ }
+
+ /**
+ * Get the count of rules with notapplicable result.
+ * @return count of rules with notapplicable result
+ */
+ public Long getNotapplicable() {
+ return getCountOf(NOTAPPLICABLE_LABEL);
+ }
+
+ /**
+ * Get the count of rules with notchecked result.
+ * @return count of rules with notchecked result
+ */
+ public Long getNotchecked() {
+ return getCountOf(NOTCHECKED_LABEL);
+ }
+
+ /**
+ * Get the count of rules with notselected result.
+ * @return count of rules with notselected result
+ */
+ public Long getNotselected() {
+ return getCountOf(NOTSELECTED_LABEL);
+ }
+
+ /**
+ * Get the count of rules with informational result.
+ * @return count of rules with informational result
+ */
+ public Long getInformational() {
+ return getCountOf(INFORMATIONAL_LABEL);
+ }
+
+ /**
+ * Get the count of rules with fixed result.
+ * @return count of rules with fixed result
+ */
+ public Long getFixed() {
+ return getCountOf(FIXED_LABEL);
+ }
+
+ /**
+ * For a simple view, get satisfied results
+ * @return the count
+ */
+ public Long getSatisfied() {
+ return getPass() + getFixed();
+ }
+
+ /**
+ * For a simple view, get dissatisfied results
+ * @return the count
+ */
+ public Long getDissatisfied() {
+ return getFail();
+ }
+
+ /**
+ * For a simple view, get results which are generally unknown
+ * @return the count
+ */
+ public Long getSatisfactionUnknown() {
+ return getError() + getUnknown() + getNotchecked();
+ }
+
+ private Long getCountOf(String resultLabel) {
+ Long result = getCountMap().get(resultLabel);
+ return (result != null) ? result : 0;
+ }
+
+ private HashMap<String, Long> getCountMap() {
+ if (this.countMap == null) {
+ this.countMap = new HashMap<String, Long>();
+ if (this.label != null && this.count != null) {
+ for (int i = 0; i < this.label.size(); i++) {
+ this.countMap.put((String) this.label.get(i),
+ (Long) this.count.get(i));
+ }
+ }
+ }
+ return this.countMap;
+ }
+}
diff --git a/java/code/src/com/redhat/rhn/frontend/dto/XccdfTestResultDto.java b/java/code/src/com/redhat/rhn/frontend/dto/XccdfTestResultDto.java
new file mode 100644
index 0000000..0e650f0
--- /dev/null
+++ b/java/code/src/com/redhat/rhn/frontend/dto/XccdfTestResultDto.java
@@ -0,0 +1,112 @@
+/**
+ * Copyright (c) 2012 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.dto;
+
+import java.util.Date;
+
+/**
+ * Simple DTO for transfering data from the DB to the UI through datasource.
+ * @version $Rev$
+ */
+public class XccdfTestResultDto extends XccdfTestResultCounts {
+
+ private Long xid;
+ private Long sid;
+ private String serverName;
+ private String profile;
+ private Date completed;
+
+ /**
+ * Returns id of xccdf:TestResult
+ * @return the xid
+ */
+ public Long getXid() {
+ return this.xid;
+ }
+
+ /**
+ * Sets the id of xccdf:TestResult
+ * @param xidIn to set
+ */
+ public void setXid(Long xidIn) {
+ this.xid = xidIn;
+ }
+
+ /**
+ * Returns id of targeted system
+ * @return the sid
+ */
+ public Long getSid() {
+ return this.sid;
+ }
+
+ /**
+ * Sets the id of targeted system
+ * @param sidIn to set
+ */
+ public void setSid(Long sidIn) {
+ this.sid = sidIn;
+ }
+
+ /**
+ * Returns name of the targeted system
+ * @return the name
+ */
+ public String getServerName() {
+ return this.serverName;
+ }
+
+ /**
+ * Sets the name of the targeted system
+ * @param serverNameIn to set
+ */
+ public void setServerName(String serverNameIn) {
+ this.serverName = serverNameIn;
+ }
+
+ /**
+ * Returns the name of assigned xccdf:Profile
+ * @return the name
+ */
+ public String getProfile() {
+ return this.profile;
+ }
+
+ /**
+ * Sets the name of assigned xccdf:Profile
+ * @param profileIn to set
+ */
+ public void setProfile(String profileIn) {
+ this.profile = profileIn;
+ }
+
+ /**
+ * Returns completetion time of scan
+ * @return completetion time
+ */
+ public Date getCompleted() {
+ return new Date(this.completed.getYear(), this.completed.getMonth(),
+ this.completed.getDate(), this.completed.getHours(),
+ this.completed.getMinutes(), this.completed.getSeconds());
+ }
+
+ /**
+ * Sets the completetion time of scan
+ * @param completedIn to set
+ */
+ public void setCompleted(Date completedIn) {
+ this.completed = completedIn;
+ }
+}
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml
index fa0f59a..0bfbdd5 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml
@@ -367,6 +367,12 @@ http://www.oasis-open.org/committees/xliff/documents/xliff-core-1.1.xsd"
<context context-type="sourcefile">Navigation Menu</context>
</context-group>
</trans-unit>
+ <trans-unit id="OpenSCAP">
+<source>OpenSCAP</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">Navigation Menu</context>
+ </context-group>
+ </trans-unit>
<trans-unit id="Channel Management">
<source>Channel Management</source>
<context-group name="ctx">
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 fd70f40..afe8387 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
@@ -11975,6 +11975,30 @@ the <strong>Red Hat Enterprise Linux System Administration Guide.</stro
</trans-unit>
</group>
+ <group>
+ <context-group name="ctx">
+ <context context-type="sourcefile">View of SCAP scans for whole infrastructure</context>
+ </context-group>
+ <trans-unit id="audit.listxccdf.jsp.profile">
+ <source>Xccdf Profile</source>
+ </trans-unit>
+ <trans-unit id="audit.listxccdf.jsp.noscans">
+ <source>There are no SCAP results reported yet.</source>
+ </trans-unit>
+ <trans-unit id="audit.listxccdf.jsp.satisfied">
+ <source>Satisfied</source>
+ </trans-unit>
+ <trans-unit id="audit.listxccdf.jsp.dissatisfied">
+ <source>Dissatisfied</source>
+ </trans-unit>
+ <trans-unit id="audit.listxccdf.jsp.satisfactionunknown">
+ <source>Unknown</source>
+ </trans-unit>
+ <trans-unit id="audit.listxccdf.jsp.tooltip">
+ <source>The last three columns represent numbers of xccdf:Rules evaluated with a given result. Satisfied = P + X, Dissatisfied = F, Unknown = E + U + K.</source>
+ </trans-unit>
+ </group>
+
<!-- Action common -->
<group>
<context-group name="ctx">
diff --git a/java/code/src/com/redhat/rhn/manager/audit/ScapManager.java b/java/code/src/com/redhat/rhn/manager/audit/ScapManager.java
index 3040932..cc527b2 100644
--- a/java/code/src/com/redhat/rhn/manager/audit/ScapManager.java
+++ b/java/code/src/com/redhat/rhn/manager/audit/ScapManager.java
@@ -51,6 +51,20 @@ public class ScapManager extends BaseManager {
}
/**
+ * Show brief results of all scans accessible by user.
+ * Sorted by date, descending.
+ * @param user The user requesting.
+ * @return The list of scan results
+ */
+ public static DataResult latestTestResultByUser(User user) {
+ SelectMode m = ModeFactory.getMode("scap_queries",
+ "latest_testresults_by_user");
+ HashMap params = new HashMap();
+ params.put("user_id", user.getId());
+ return makeDataResult(params, new HashMap(), null, m);
+ }
+
+ /**
* Show brief results of all scans for given system
* @param server The system for which to search
* @return The list of scan results in brief
diff --git a/java/code/webapp/WEB-INF/nav/sitenav-authenticated.xml b/java/code/webapp/WEB-INF/nav/sitenav-authenticated.xml
index 129cd55..a79d842 100644
--- a/java/code/webapp/WEB-INF/nav/sitenav-authenticated.xml
+++ b/java/code/webapp/WEB-INF/nav/sitenav-authenticated.xml
@@ -173,6 +173,7 @@
<rhn-tab name="Overview" url="/rhn/audit/Overview.do">
<rhn-tab name="Reviews" url="/rhn/audit/Machine.do" />
</rhn-tab>
+ <rhn-tab name="OpenSCAP" url="/rhn/audit/ListXccdf.do" />
<rhn-tab name="Search" url="/rhn/audit/Search.do" />
</rhn-tab>
<rhn-tab name="config.nav.config" url="/rhn/configuration/Overview.do" acl="org_entitlement(rhn_provisioning);user_role(config_admin)">
diff --git a/java/code/webapp/WEB-INF/pages/audit/listxccdf.jsp b/java/code/webapp/WEB-INF/pages/audit/listxccdf.jsp
new file mode 100644
index 0000000..b57d55b
--- /dev/null
+++ b/java/code/webapp/WEB-INF/pages/audit/listxccdf.jsp
@@ -0,0 +1,23 @@
+<%@ taglib uri="http://rhn.redhat.com/rhn" prefix="rhn" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ 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" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
+
+<html:xhtml/>
+<html>
+<head>
+ <meta name="page-decorator" content="none" />
+</head>
+
+<body>
+
+<rhn:toolbar base="h1" img="/img/rhn-icon-system.gif" imgAlt="audit.jsp.alt">
+ <bean:message key="system.audit.listscap.jsp.overview"/>
+</rhn:toolbar>
+
+<%@ include file="/WEB-INF/pages/common/fragments/audit/xccdf-easy-list.jspf" %>
+
+</body>
+</html>
diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/audit/xccdf-easy-list.jspf b/java/code/webapp/WEB-INF/pages/common/fragments/audit/xccdf-easy-list.jspf
new file mode 100644
index 0000000..05be7e9
--- /dev/null
+++ b/java/code/webapp/WEB-INF/pages/common/fragments/audit/xccdf-easy-list.jspf
@@ -0,0 +1,38 @@
+<rl:listset name="groupSet" legend="xccdf">
+ <rhn:csrf />
+ <rhn:submitted />
+
+ <rl:list emptykey="audit.listxccdf.jsp.noscans">
+ <rl:decorator name="ElaborationDecorator"/>
+ <rl:decorator name="PageSizeDecorator"/>
+
+ <rl:column headerkey="systemlist.jsp.system" sortable="true" sortattr="serverName">
+ <c:out escapeXml="false"
+ value="<a href=\"/rhn/systems/details/audit/ListScap.do?sid=${current.sid}\">"/>
+ <c:out value="${current.serverName}"/>
+ <c:out escapeXml="false" value="</a>"/>
+ </rl:column>
+ <rl:column headerkey="audit.listxccdf.jsp.profile" sortable="true" sortattr="profile"
+ filterattr="profile">
+ <c:out escapeXml="false"
+ value="<a href=\"/rhn/systems/details/audit/XccdfDetails.do?sid=${current.sid}&xid=${current.xid}\">"/>
+ <c:out value="${current.profile}"/>
+ <c:out escapeXml="false" value="</a>"/>
+ </rl:column>
+ <rl:column headerkey="system.audit.listscap.jsp.completed" sortable="true" sortattr="completed"
+ defaultsort="desc">
+ <c:out value="${current.completed}"/>
+ </rl:column>
+ <rl:column headerkey="audit.listxccdf.jsp.satisfied">
+ <c:out value="${current.satisfied}"/>
+ </rl:column>
+ <rl:column headerkey="audit.listxccdf.jsp.dissatisfied">
+ <c:out value="${current.dissatisfied}"/>
+ </rl:column>
+ <rl:column headerkey="audit.listxccdf.jsp.satisfactionunknown">
+ <c:out value="${current.satisfactionUnknown}"/>
+ </rl:column>
+ </rl:list>
+</rl:listset>
+
+<rhn:tooltip key="audit.listxccdf.jsp.tooltip"/>
diff --git a/java/code/webapp/WEB-INF/struts-config.xml b/java/code/webapp/WEB-INF/struts-config.xml
index 9c7bb6e..2c79bb3 100644
--- a/java/code/webapp/WEB-INF/struts-config.xml
+++ b/java/code/webapp/WEB-INF/struts-config.xml
@@ -1923,6 +1923,13 @@
<forward name="success" path="/audit/Machine.do" redirect="true"/>
</action>
+ <action path="/audit/ListXccdf"
+ scope="request"
+ input="/WEB-INF/pages/audit/listxccdf.jsp"
+ type="com.redhat.rhn.frontend.action.audit.ListXccdfAction">
+ <forward name="default" path="/WEB-INF/pages/audit/listxccdf.jsp"/>
+ </action>
+
<!-- ===== ERRATA ===== -->
<action path="/errata/Search"
name="errataSearchForm"
commit 816b1fc01c3d97e83d4153748e24eb0ec8faaab6
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Tue Apr 10 10:55:12 2012 +0200
The tool is called OpenSCAP actually.
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 e8fdccb..fd70f40 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
@@ -11817,7 +11817,7 @@ the <strong>Red Hat Enterprise Linux System Administration Guide.</stro
<context context-type="sourcefile">View of SCAP scans for given system</context>
</context-group>
<trans-unit id="system.audit.listscap.jsp.overview">
- <source>Open SCAP Scans</source>
+ <source>OpenSCAP Scans</source>
</trans-unit>
<trans-unit id="system.audit.listscap.jsp.missing">
<source>This system does not yet have OpenSCAP scan capability. OpenSCAP scanning requires that particular software is installed and enabled on your system. You may ensure that OpenSCAP capability wil be enabled on this system by installing "{0}" package.</source>
commit 628703dd0c19b4da810e1b870f6cfe7a23edd8e5
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Fri Apr 6 18:35:55 2012 +0200
Add missing </a> tag in case when the serverName is unknown.
diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/systems/system_list_fragment.jspf b/java/code/webapp/WEB-INF/pages/common/fragments/systems/system_list_fragment.jspf
index 959f4db..b4efe33 100644
--- a/java/code/webapp/WEB-INF/pages/common/fragments/systems/system_list_fragment.jspf
+++ b/java/code/webapp/WEB-INF/pages/common/fragments/systems/system_list_fragment.jspf
@@ -15,6 +15,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="false" />
</c:otherwise>
</c:choose>
+ <c:out value="</a>" escapeXml="false"/>
12 years
java/code
by Jan Pazdziora
java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/ConfigFileNameDtoSerializer.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit dd8ac9ac8b3b83bc805929c46c25f838e85259b9
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Tue Apr 10 10:57:44 2012 +0200
The system.config.listFiles should return channel label, not name.
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/ConfigFileNameDtoSerializer.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/ConfigFileNameDtoSerializer.java
index a17ddfb..3f8fe0e 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/ConfigFileNameDtoSerializer.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/ConfigFileNameDtoSerializer.java
@@ -72,7 +72,7 @@ public class ConfigFileNameDtoSerializer implements XmlRpcCustomSerializer {
ConfigChannelType.lookup(dto.getConfigChannelType());
helper.add("channel_type", type);
if (type.equals(ConfigChannelType.global())) {
- helper.add("channel_label", dto.getConfigChannelName());
+ helper.add("channel_label", dto.getConfigChannelLabel());
}
helper.add("last_modified", dto.getLastModifiedDate());
helper.writeTo(output);
12 years
Changes to 'refs/tags/osad-5.10.43-1'
by StephenHerr
Tag 'osad-5.10.43-1' created by Stephen Herr <sherr(a)redhat.com> at 2012-04-09 15:43 +0000
Tagging package [osad] version [5.10.43-1] in directory [client/tools/osad/].
Changes since spacewalk-java-1.8.37-1:
Jan Pazdziora (1):
Allow Oracle database to ptrace self.
Milan Zazrivec (4):
rhn-db-stats: support for PostgreSQL
rhn-db-stats: update manual page
rhn-schema-stats: support for PostgreSQL
rhn-schema-stats: update manual page
Stephen Herr (3):
810871 - Reduce languages available in editarea to only common / useful ones.
810908 - Make osa-dispatcher use the hostname in the rhn.conf if present
Automatic commit of package [osad] release [5.10.43-1].
---
backend/satellite_tools/rhn-db-stats | 36 +++---
backend/satellite_tools/rhn-db-stats.sgml | 7 -
backend/satellite_tools/rhn-schema-stats | 54 +++++++---
backend/satellite_tools/rhn-schema-stats.sgml | 7 -
client/tools/osad/osad.spec | 6 -
client/tools/osad/src/osa_dispatcher.py | 8 +
java/code/webapp/WEB-INF/pages/common/fragments/editarea.jspf | 4
rel-eng/packages/osad | 2
selinux/oracle-xe-selinux/oracle-xe.te | 1
9 files changed, 79 insertions(+), 46 deletions(-)
---
12 years
2 commits - client/tools rel-eng/packages
by StephenHerr
client/tools/osad/osad.spec | 6 +++++-
client/tools/osad/src/osa_dispatcher.py | 8 ++++++--
rel-eng/packages/osad | 2 +-
3 files changed, 12 insertions(+), 4 deletions(-)
New commits:
commit a3edb0b505cefadfff35ce0ee6397709555cbd62
Author: Stephen Herr <sherr(a)redhat.com>
Date: Mon Apr 9 11:43:29 2012 -0400
Automatic commit of package [osad] release [5.10.43-1].
diff --git a/client/tools/osad/osad.spec b/client/tools/osad/osad.spec
index f66bd5c..fae875a 100644
--- a/client/tools/osad/osad.spec
+++ b/client/tools/osad/osad.spec
@@ -16,7 +16,7 @@ Group: System Environment/Daemons
License: GPLv2
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
-Version: 5.10.42
+Version: 5.10.43
Release: 1%{?dist}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -278,6 +278,10 @@ rpm -ql osa-dispatcher | xargs -n 1 /sbin/restorecon -rvi {}
%endif
%changelog
+* Mon Apr 09 2012 Stephen Herr <sherr(a)redhat.com> 5.10.43-1
+- 810908 - Make osa-dispatcher use the hostname in the rhn.conf if present
+ (sherr(a)redhat.com)
+
* Tue Apr 03 2012 Jan Pazdziora 5.10.42-1
- use %%global, not %%define (msuchy(a)redhat.com)
- osad.src:477: W: macro-in-%%changelog %%descriptions (msuchy(a)redhat.com)
diff --git a/rel-eng/packages/osad b/rel-eng/packages/osad
index f6740f2..b92821a 100644
--- a/rel-eng/packages/osad
+++ b/rel-eng/packages/osad
@@ -1 +1 @@
-5.10.42-1 client/tools/osad/
+5.10.43-1 client/tools/osad/
commit 30b06a259d20516c541e509a853cfd3de98255c7
Author: Stephen Herr <sherr(a)redhat.com>
Date: Mon Apr 9 11:43:12 2012 -0400
810908 - Make osa-dispatcher use the hostname in the rhn.conf if present
diff --git a/client/tools/osad/src/osa_dispatcher.py b/client/tools/osad/src/osa_dispatcher.py
index 8b43b1f..2071672 100644
--- a/client/tools/osad/src/osa_dispatcher.py
+++ b/client/tools/osad/src/osa_dispatcher.py
@@ -130,11 +130,15 @@ class Runner(jabber_lib.Runner):
log_debug(1, "Upstream notification server started on port", port)
self._tcp_server.set_jabber_connection(c)
-
+
self._poll_interval = CFG.poll_interval
self._next_poll_interval = self._poll_interval
- hostname = socket.gethostname()
+ if self._jabber_servers and self._jabber_servers[0]:
+ hostname = self._jabber_servers[0]
+ else:
+ hostname = socket.gethostname()
+
self._register_dispatcher(c.jid, hostname, port)
c.retrieve_roster()
12 years
java/code
by StephenHerr
java/code/webapp/WEB-INF/pages/common/fragments/editarea.jspf | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 91e2cc74c8a6e81c7b3faee7866c609c04463449
Author: Stephen Herr <sherr(a)redhat.com>
Date: Mon Apr 9 09:44:47 2012 -0400
810871 - Reduce languages available in editarea to only common / useful ones.
diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/editarea.jspf b/java/code/webapp/WEB-INF/pages/common/fragments/editarea.jspf
index 4cc0e13..c7efbc1 100644
--- a/java/code/webapp/WEB-INF/pages/common/fragments/editarea.jspf
+++ b/java/code/webapp/WEB-INF/pages/common/fragments/editarea.jspf
@@ -7,6 +7,8 @@ editAreaLoader.init({
,allow_resize: "both"
,word_wrap: true
,toolbar: "search, go_to_line, |, undo, redo, |, syntax_selection, |, highlight, reset_highlight, |, help"
- ,syntax: "bash"
+ ,syntax: "bash"
+ ,syntax_selection_allow: "bash,perl,php,python,ruby,xml"
+ ,start_highlight: true // default syntax highlighting on
});
</script>
12 years
4 commits - backend/satellite_tools
by Milan Zazrivec
backend/satellite_tools/rhn-db-stats | 36 +++++++++--------
backend/satellite_tools/rhn-db-stats.sgml | 7 ---
backend/satellite_tools/rhn-schema-stats | 54 ++++++++++++++++++++------
backend/satellite_tools/rhn-schema-stats.sgml | 7 ---
4 files changed, 63 insertions(+), 41 deletions(-)
New commits:
commit 406a9e35f36ca3bb5a08e5980d5b96fd88855df9
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Fri Apr 6 13:23:38 2012 +0200
rhn-schema-stats: update manual page
connect string is no longer a valid option
diff --git a/backend/satellite_tools/rhn-schema-stats.sgml b/backend/satellite_tools/rhn-schema-stats.sgml
index e3f7ba2..668b15b 100644
--- a/backend/satellite_tools/rhn-schema-stats.sgml
+++ b/backend/satellite_tools/rhn-schema-stats.sgml
@@ -23,7 +23,6 @@ utility for querying important Spacewalk / Satellite database schema statistics.
<command>&THECOMMAND;</command>
<arg choice="opt">-h | --help</arg>
<arg choice="req">output-file</arg>
- <arg choice="opt">db-conect-string</arg>
</cmdsynopsis>
</Synopsis>
</RefSynopsisDiv>
@@ -53,12 +52,6 @@ schema. Ordinarily, is used by spacewalk-debug (satellite-debug), but it can be
print the output to stdout.</para>
</listitem>
</varlistentry>
- <varlistentry>
- <term>db-connect-string</term>
- <listitem>
- <para>Connection string to your Oracle database.</para>
- </listitem>
- </varlistentry>
</variablelist>
</RefSect1>
commit 89a9eae876d01e95c5cfd87c54183a922fca5374
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Fri Apr 6 13:22:41 2012 +0200
rhn-schema-stats: support for PostgreSQL
diff --git a/backend/satellite_tools/rhn-schema-stats b/backend/satellite_tools/rhn-schema-stats
index 613002d..dfc7873 100755
--- a/backend/satellite_tools/rhn-schema-stats
+++ b/backend/satellite_tools/rhn-schema-stats
@@ -1,14 +1,12 @@
#!/bin/bash
-if [[ $@ =~ "--help|-h" ]] || [ $# -lt 1 -o $# -gt 2 ]; then
- echo "Usage: `basename $0` -h | --help | output-file [connect-string]"
+if [[ $@ =~ "--help" ]] || [[ $@ =~ "-h" ]] || [ $# -ne 1 ]; then
+ echo "Usage: `basename $0` -h | --help | output-file"
exit
fi
-connect=$(spacewalk-cfg-get default_db)
-[ -n "$2" ] && connect=$2
-
-sql="
+if [ $(spacewalk-cfg-get db_backend) = "oracle" ]; then
+ sql="
set pagesize 4000 linesize 200
set serverout on
@@ -58,11 +56,45 @@ where
quit;
"
+elif [ $(spacewalk-cfg-get db_backend) = "postgresql" ]; then
+ sql="
+select schemaname as schema,
+ relname as table,
+ n_live_tup as rows
+ from pg_stat_user_tables
+ order by n_live_tup desc;
+
+select con.conname as name,
+ con.contype as type,
+ cl.relname as table,
+ con.consrc as src
+ from pg_constraint con,
+ pg_class cl
+ where cl.oid = con.conrelid
+ order by name;
+
+select
+ rvi.label, to_char(rvi.created, 'YYYY-MM-DD') as created,
+ to_char(rvi.modified, 'YYYY-MM-DD') as modified,
+ rpn.name,
+ rpe.epoch,
+ rpe.version,
+ rpe.release
+from
+ rhnVersionInfo rvi,
+ rhnPackageName rpn,
+ rhnPackageEvr rpe
+where
+ rvi.evr_id = rpe.id and
+ rvi.name_id = rpn.id;
+"
+
+fi
+
+output=$(echo "$sql" | spacewalk-sql --select-mode -)
-if [ "$1" == "-" ]; then
- echo "$sql" | sqlplus -S $connect
+if [ "$1" = "-" ]; then
+ echo "$output"
else
- # sqlplus ... | cat ... is here to fool selinux, since oracle_sqlplus_t
- # cannot write just anywhere (via spool ...)
- echo "$sql" | sqlplus -S $connect | cat > $1
+ echo "$output" > $1
fi
commit b4af73bf66e2b58f9f73d1700cec87f367606643
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Fri Apr 6 12:49:48 2012 +0200
rhn-db-stats: update manual page
connect string is no longer a valid command line option
diff --git a/backend/satellite_tools/rhn-db-stats.sgml b/backend/satellite_tools/rhn-db-stats.sgml
index 3ff342c..e26f8a0 100644
--- a/backend/satellite_tools/rhn-db-stats.sgml
+++ b/backend/satellite_tools/rhn-db-stats.sgml
@@ -24,7 +24,6 @@ utility for querying important database parameters used by
<command>&THECOMMAND;</command>
<arg choice="opt">-h | --help</arg>
<arg choice="req">output-file</arg>
- <arg choice="opt">db-conect-string</arg>
</cmdsynopsis>
</Synopsis>
</RefSynopsisDiv>
@@ -55,12 +54,6 @@ used by your Satellite / Spacewalk installation. It is used by spacewalk-debug
print the output to stdout.</para>
</listitem>
</varlistentry>
- <varlistentry>
- <term>db-connect-string</term>
- <listitem>
- <para>Connection string to your Oracle database.</para>
- </listitem>
- </varlistentry>
</variablelist>
</RefSect1>
commit 4c775d87c7e0ae268bcb1a8963e3d494351765f2
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Fri Apr 6 12:49:00 2012 +0200
rhn-db-stats: support for PostgreSQL
diff --git a/backend/satellite_tools/rhn-db-stats b/backend/satellite_tools/rhn-db-stats
index 0895cdd..d6160ad 100755
--- a/backend/satellite_tools/rhn-db-stats
+++ b/backend/satellite_tools/rhn-db-stats
@@ -1,27 +1,31 @@
#!/bin/sh
-if [[ $@ =~ "--help|-h" ]] || [ $# -lt 1 -o $# -gt 2 ]; then
- echo "Usage: `basename $0` -h | --help | output-file [connect-string]"
- exit
+if [[ $@ =~ "-h" ]] || [[ $@ =~ "--help" ]] || [ $# -ne 1 -o $# -gt 1 ]; then
+ echo "Usage: `basename $0` -h | --help | output-file"
+ exit
fi
-connect=$(spacewalk-cfg-get default_db)
-[ -n "$2" ] && connect=$2
-
-sql="
-set serverout on
-set pagesize 2000 linesize 145
-column name_col_plus_show_param format a40 word wrap heading PARAMETER
-column value_col_plus_show_param format a90 word wrap heading VALUE
+if [ "$(spacewalk-cfg-get db_backend)" = "oracle" ]; then
+ sql="
+set serverout on;
+set pagesize 2000 linesize 145;
+column name_col_plus_show_param format a40 word wrap heading PARAMETER;
+column value_col_plus_show_param format a90 word wrap heading VALUE;
select dbms_stats.get_param('METHOD_OPT') from dual;
show parameter;
"
-if [ "$1" == "-" ]; then
- echo "$sql" | sqlplus -S $connect
+elif [ "$(spacewalk-cfg-get db_backend)" = "postgresql" ]; then
+ sql="
+SHOW ALL;
+"
+fi
+
+output=$(echo "$sql" | spacewalk-sql --select-mode -)
+
+if [ "$1" = "-" ]; then
+ echo "$output"
else
- # sqlplus ... | cat ... is here to fool selinux, since oracle_sqlplus_t
- # cannot write just anywhere (via spool ...)
- echo "$sql" | sqlplus -S $connect | cat > $1
+ echo "$output" > $1
fi
12 years, 1 month
selinux/oracle-xe-selinux
by Jan Pazdziora
selinux/oracle-xe-selinux/oracle-xe.te | 1 +
1 file changed, 1 insertion(+)
New commits:
commit d3ec414a58f5374f957963aa86656ca3449a81e1
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Apr 6 09:44:51 2012 +0200
Allow Oracle database to ptrace self.
Addressing
avc: denied { ptrace } for pid=16544 comm="oracle" scontext=root:system_r:oracle_db_t:s0 tcontext=root:system_r:oracle_db_t:s0-s0:c0.c1023 tclass=process
Was caused by:
Constraint violation.
Check policy/constraints.
Typically, you just need to add a type attribute to the domain to satisfy the constraint.
diff --git a/selinux/oracle-xe-selinux/oracle-xe.te b/selinux/oracle-xe-selinux/oracle-xe.te
index 61467d6..af31a47 100644
--- a/selinux/oracle-xe-selinux/oracle-xe.te
+++ b/selinux/oracle-xe-selinux/oracle-xe.te
@@ -35,3 +35,4 @@ allow oracle_db_t self:process ptrace;
term_dontaudit_use_console(oracle_db_t)
term_dontaudit_use_console(oracle_tnslsnr_t)
+mcs_ptrace_all(oracle_db_t)
12 years, 1 month
Changes to 'refs/tags/spacewalk-java-1.8.37-1'
by Michael Mraka
Tag 'spacewalk-java-1.8.37-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2012-04-06 08:56 +0000
Tagging package [spacewalk-java] version [1.8.37-1] in directory [java/].
Changes since spacecmd-1.8.3-1:
Michael Mraka (2):
improved performance of repomd generation
Automatic commit of package [spacewalk-java] release [1.8.37-1].
---
java/code/src/com/redhat/rhn/common/db/datasource/xml/Task_queries.xml | 18 +++++-----
java/spacewalk-java.spec | 5 ++
rel-eng/packages/spacewalk-java | 2 -
3 files changed, 14 insertions(+), 11 deletions(-)
---
12 years, 1 month