Bug 1003459 - "rhncfg-client verify" and WebUI compare display different results for selinux context.
Summary: "rhncfg-client verify" and WebUI compare display different results for selinu...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Clients
Version: 2.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Milan Zázrivec
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space21 1113848
TreeView+ depends on / blocked
 
Reported: 2013-09-02 05:51 UTC by Neha
Modified: 2016-08-15 02:08 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1113848 (view as bug list)
Environment:
Last Closed: 2014-03-04 13:08:26 UTC
Embargoed:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.