Bug 1003459

Summary: "rhncfg-client verify" and WebUI compare display different results for selinux context.
Product: [Community] Spacewalk Reporter: Neha <nerawat>
Component: ClientsAssignee: Milan Zázrivec <mzazrivec>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.0CC: sashinde
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1113848 (view as bug list) Environment:
Last Closed: 2014-03-04 13:08:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1069560, 1113848    

Description Neha 2013-09-02 05:51:28 UTC
Description of problem:
rhncfg-client verify and WebUI compare displays different results for selinux context if selinux is disabled on client server.

from cli it doesnt check weather selinux is enabled or not on the target system, but for GUI results it check for selinux status.

So if selinux is disabled on client server, it end up with different results.

For GUI results it always pass actual value as blank []
so always displays differences exists, but from client it takes actual value of selinux context weather its disabled or not.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Add a file in a config channel and set selinux context.
2. Deploy file on client server rhncfg-client get
3. disable selinux on client 
4. Now schedule compare from GUI.
5. From cli run rhncfg-client verify

Actual results:
Using GUI its always displays differences exist in this case, but different results from client side

Expected results:

Both results should be same

Additional info:

Comment 1 Neha 2013-09-02 05:56:43 UTC
For GUI "file_utils.py":


        try:
            cur_sectx = lgetfilecon(path)[1]
        except OSError: # workarounding BZ 690238
            cur_sectx = None
        if not is_selinux_enabled():
            cur_sectx = None

        if cur_sectx == None:
            cur_sectx = ''

        if file_struct.has_key('selinux_ctx') and file_struct['selinux_ctx']:
            if cur_sectx != file_struct['selinux_ctx']:
                sectx_result = "SELinux contexts differ:  actual: [%s], expected: [%s]\n" % (cur_sectx, file_struct['selinux_ctx'])

Here is selinux is disabled sending actual value as blank ""

if not is_selinux_enabled():
            cur_sectx = None


Regards,
Neha

Comment 4 Milan Zázrivec 2013-09-05 12:50:31 UTC
spacewalk.git master: 0dac0283cb9e285c3491a70b0a7c2c7490fabf3b

Comment 5 Matej Kollar 2014-01-17 12:16:13 UTC
Switching MODIFIED Spacewalk bugs to ON_QA before 2.1 release.

Comment 6 Matej Kollar 2014-03-04 13:08:26 UTC
Spacewalk 2.1 has been released.
https://fedorahosted.org/spacewalk/wiki/ReleaseNotes21

Comment 7 Matej Kollar 2014-03-04 13:09:07 UTC
Spacewalk 2.1 has been released.
https://fedorahosted.org/spacewalk/wiki/ReleaseNotes21