Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1021930 - From webUI, Config file compare doesn't check for user, group and permissions.
Summary: From webUI, Config file compare doesn't check for user, group and permissions.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Clients
Version: 2.2
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Stephen Herr
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space23
TreeView+ depends on / blocked
 
Reported: 2013-10-22 10:59 UTC by Neha
Modified: 2016-08-15 02:08 UTC (History)
1 user (show)

Fixed In Version: rhncfg-5.10.73-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-18 15:08:47 UTC
Embargoed:


Attachments (Terms of Use)
proposed patch (3.69 KB, patch)
2013-10-22 11:05 UTC, Neha
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1113848 0 medium CLOSED "rhncfg-client verify" and WebUI compare display different results for selinux context. 2022-05-16 11:32:56 UTC
Red Hat Bugzilla 1120802 0 medium CLOSED From spacewalk webUI, Config file compare doesn't check for user, group and permissions. 2022-05-16 11:32:56 UTC

Internal Links: 1113848 1120802

Description Neha 2013-10-22 10:59:40 UTC
Description of problem:
From  WebUI, config file comparison doesnt check for user, mode and permissions.

It displays compare results for only selinux and file content. 

Other way when checking from client side
rhncfg-client verify

It display results for user, group, permissions, selinux and file content.
 
Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. change in file's user, group and permissions
2. Schedule compare from GUI 
3. Check for results from event -> history 

Actual results:
It should display differences in user, group and permissions

Expected results:
It will display "No Differences"

Additional info:

Comment 1 Neha 2013-10-22 11:00:22 UTC
Current code for diff functionality 

   else:
            result = ''.join(diff(temp_file, path))

        os.unlink(temp_file)
        return sectx_result + result


It displays results -> content diff + selinux diff


And from cmd line:

rhncfg-client verify 

                                  /root/nerawat/nerawat2/test1
                                  /root/nerawat/nerawat2/test2
                    mode,modified /root/nerawat/test1
 user,group,mode,selinux,modified /root/nerawat/test2
                                  /root/nerawat/test3
                          selinux /root/nerawat/test4
                                  /root/test

Comment 2 Neha 2013-10-22 11:05:37 UTC
Created attachment 814936 [details]
proposed patch

Comment 3 Neha 2013-10-22 11:14:54 UTC
According to current functionality only selinux check and check for links

SELinux contexts differ:  actual: [root:object_r:user_home_dir_t], expected: [user_u:role_r]


Added for group, user and mod:

User name differ: actual: [nerawat], expected: [root]
Group name differ: actual: [nerawat], expected: [root]
File mode differ: actual: [777], expected: [775]

~ Neha

Comment 4 Stephen Herr 2014-07-18 12:27:03 UTC

*** This bug has been marked as a duplicate of bug 1120802 ***

Comment 5 Stephen Herr 2014-07-18 13:28:28 UTC
I'm going to use this bug as the tracker for releaseing the changes that are in bug 1120802 and bug 1113848 to Spacewalk 2.2.

These packages should fix:
1) always showing "differences exist" in the webui even though the diff is blank
2) improper diffing of selinux contexts
3) improper diffing of ownership / permissions

Cherry-picking to Spacewalk 2.2:
da0ac46b711066930eee7c9c2231d3743a635b70
a14909cc92c49b635270fd008991076021c9d614
13f60e4746d717c808545daa030d0be5b2ac976d
954540fae59babd51afe19c98fc31d4a5695963d


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