Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 829992 Details for
Bug 1032941
hwcert-backend Error: could not determine selinux parameters
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Fix the error "could not determine selinux parameters" when selinux is disabled
0001-1032941-hwcert-backend-Error-could-not-determine-sel.patch (text/plain), 3.13 KB, created by
Dong Zhu
on 2013-11-28 05:37:44 UTC
(
hide
)
Description:
Fix the error "could not determine selinux parameters" when selinux is disabled
Filename:
MIME Type:
Creator:
Dong Zhu
Created:
2013-11-28 05:37:44 UTC
Size:
3.13 KB
patch
obsolete
>From 3412c6ea7d7231a67418ac8b22e21e00aa425903 Mon Sep 17 00:00:00 2001 >From: Dong Zhu <dzhu@redhat.com> >Date: Thu, 28 Nov 2013 13:33:30 +0800 >Subject: [PATCH] 1032941 - hwcert-backend Error: could not determine selinux > parameters > >Signed-off-by: Dong Zhu <dzhu@redhat.com> >--- > hwcert/networkTest.py | 10 ++++++---- > tests/info/info.py | 10 +++++++--- > 2 files changed, 13 insertions(+), 7 deletions(-) > >diff --git a/hwcert/networkTest.py b/hwcert/networkTest.py >index d0eaf19..2ec26a9 100644 >--- a/hwcert/networkTest.py >+++ b/hwcert/networkTest.py >@@ -495,10 +495,12 @@ class NetworkTest(Test): > def checkSELinux(self): > try: > selinuxParams = Command("/usr/sbin/sestatus") >- selinuxMode = selinuxParams.getString(regex="Current mode:[ \t]+(?P<selinuxMode>[a-zA-Z]+)", regexGroup="selinuxMode", singleLine=False) >- if selinuxMode != "permissive": >- print "Warning: SELinux is in %s mode - it must be set to \"permissive\" for certification testing." % selinuxMode >- return False >+ selinuxStatus = selinuxParams.getString(regex="SELinux status:[ \t]+(?P<selinuxStatus>[a-zA-Z]+)", regexGroup="selinuxStatus", singleLine=False) >+ if selinuxStatus == "enabled": >+ selinuxMode = selinuxParams.getString(regex="Current mode:[ \t]+(?P<selinuxMode>[a-zA-Z]+)", regexGroup="selinuxMode", singleLine=False) >+ if selinuxMode != "permissive": >+ print "Warning: SELinux is in %s mode - it must be set to \"permissive\" for certification testing." % selinuxMode >+ return False > except HwCertCommandException, exception: > print "Warning: could not determine selinux parameters" > return False >diff --git a/tests/info/info.py b/tests/info/info.py >index 77085d3..5adc68e 100644 >--- a/tests/info/info.py >+++ b/tests/info/info.py >@@ -231,9 +231,13 @@ class InfoTest(Test): > errors = list() > try: > selinuxParams = Command("/usr/sbin/sestatus") >- selinuxMode = selinuxParams.getString(regex="Current mode:[ \t]+(?P<selinuxMode>[a-zA-Z]+)", regexGroup="selinuxMode", singleLine=False) >- if selinuxMode != "enforcing": >- errors.append("Error: SELinux is in %s mode - it must be set to \"enforcing\" for certification testing." % selinuxMode) >+ selinuxStatus = selinuxParams.getString(regex="SELinux status:[ \t]+(?P<selinuxStatus>[a-zA-Z]+)", regexGroup="selinuxStatus", singleLine=False) >+ if selinuxStatus == "enabled": >+ selinuxMode = selinuxParams.getString(regex="Current mode:[ \t]+(?P<selinuxMode>[a-zA-Z]+)", regexGroup="selinuxMode", singleLine=False) >+ if selinuxMode != "enforcing": >+ errors.append("Error: SELinux is in %s mode - it must be set to \"enforcing\" for certification testing." % selinuxMode) >+ else: >+ errors.append("Error: SELinux is %s - it must be \"enabled\" for certification testing." % selinuxStatus) > if self.debug != Constants.off: > selinuxParams.printOutput() > >-- >1.8.3.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
gnichols
: review+
Actions:
View
|
Diff
Attachments on
bug 1032941
: 829992