Bug 634963

Summary: rhncfg-manager does not indicate change of selinux context between two revisions
Product: Red Hat Satellite 5 Reporter: Pavel Novotny <pnovotny>
Component: ClientAssignee: Miroslav Suchý <msuchy>
Status: CLOSED ERRATA QA Contact: Jiri Kastner <jkastner>
Severity: medium Docs Contact:
Priority: high    
Version: 540CC: cperry, jkastner, msuchy, tlestach
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rhncfg-5.9.27-6 spacewalk-backend-1.2.13-24 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 640135 (view as bug list) Environment:
Last Closed: 2011-03-07 09:23:41 UTC Type: ---
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: 671130    
Bug Blocks: 640135, 646488    

Description Pavel Novotny 2010-09-17 12:55:09 UTC
Description of problem:
`rhncfg-manager diff-revisions -r1 -r2 [file]` does not indicate the change of selinux context between two revisions of configuration file (or symlink).

Version-Release number of selected component (if applicable):
rhncfg-management-5.9.27-1.el5.noarch.rpm

How reproducible:
Always

Steps to Reproduce:
1. In Satellite WebUI create a config channel with a config file. Don't forget to fill in the SELinux context field. This creates the revision 1.
2. Change the SELinux context and save the changes. This creates the revision 2.
3. Compare these two revisions with client tools:
`rhncfg-manager diff-revisions -c [config-channel] -r1 -r2 [config-file]`

  
Actual results:
No info about selinux context change is returned.

Expected results:
*Some* info about selinux context change.

Additional info:

Comment 4 Miroslav Suchý 2010-12-21 15:59:01 UTC
Fixed in spacewalk.git as commit ec990a25c6b0ce66dd0e515cd8d0f1d645f45912 (during cherrypick be aware of re-factorization in commits  b0320c911354e9d4f453ef1b9f143d4fc30fae3a, 4359de70f79261b4cd0b68b29f758dba683d91a2)

Comment 5 Miroslav Suchý 2010-12-21 16:00:44 UTC
Now the output should be:
--- /tmp/tmp/file_test_one      2010-12-21 05:06:52     attributes: -rw-r--r-- root root root:object_r:tmp_t    config channel: conf_chan_2010_12_21_04_04_58     revision: 1
--- /tmp/tmp/file_test_one      2010-12-21 05:06:52     attributes: -rw-r--r-- root root root:object_r:bin_t    config channel: conf_chan_2010_12_21_04_04_58     revision: 2
@@ -1 +1,2 @@
+ddd
 File-Test_ONE


Note that the selinux diff is not present in classical:
rhncfg-manager diff -c $CONF_CHANN  --dest-file=/tmp/tmp/file_test_one /tmp/file_test_one
as well.

Comment 6 Miroslav Suchý 2011-01-03 15:07:29 UTC
commited to spacewalk as 46f7967afb14981095af1621d7d735c6d02d0c42
again some refactorization in:
3f70bb8be722ef230b75d8ef40c1399362f6e7e0
ec168cb800568729a58104979dd39624ef1d7971
5a29f20605409ad19f430f736bbc73a962fe1027

Comment 7 Tomas Lestach 2011-01-03 17:34:47 UTC
one more commit: e5f74328fe1e208e67620fc7797afc687c376bbd

Comment 9 Miroslav Suchý 2011-01-06 15:18:36 UTC
cherrypicked to satellite.git as commits:
156f0d9d7044b2bc16798a20abf78b17368550c2
ede015f397e2a54b43965135c1eacd18a61f3cab
90207ae02dd33a0a07e5e08619d5556e43018a0e
4b3e057b2a14cd2285302ce582db9a0d77e951de
83ace056b2aaa909d29e65f67eb52e8509e2bf00
2c6ab78ed96fd6cc433a26478b081b8f95571092
0134eef6beb31685abb88ae84b72a9bcd4e8cb7a

Comment 10 Jiri Kastner 2011-01-20 10:47:45 UTC
rhncfg-manager diff-revisions -c test-644985 -r1 -r15 /tmp/config.cfg
--- /tmp/config.cfg	2011-01-20 05:42:26	config channel: test-644985	revision: 1
--- /tmp/config.cfg	2011-01-20 05:42:26	config channel: test-644985	revision: 15
@@ -1 +1 @@
-https://bugzilla.redhat.com/show_bug.cgi?id=644985
\ No newline at end of file
+testing https://bugzilla.redhat.com/show_bug.cgi?id=644985

Comment 12 Miroslav Suchý 2011-01-20 12:05:19 UTC
Some part (especially that one which generate that diff) was in spacewalk-backend. Therefore you need RHN Satellite with packages from this errata:
https://errata.devel.redhat.com/errata/info/10407

Comment 13 Jiri Kastner 2011-01-20 15:20:34 UTC
RHEL4:
[root@rlx-3-20 ~]# rhncfg-manager diff-revisions -c test-644985 -r1 -r15 /tmp/config.cfg
Red Hat Network username: admin
Password: 
--- /tmp/config.cfg	2011-01-20 10:17:37	attributes: -rw-r--r-- root root root:object_r:unconfined_t	config channel: test-644985	revision: 1
--- /tmp/config.cfg	2011-01-20 10:17:37	attributes: -rw-r--r-- root root unconfined_u:object_r:httpd_sys_content_t:s0	config channel: test-644985	revision: 15
@@ -1 +1 @@
-https://bugzilla.redhat.com/show_bug.cgi?id=644985
\ No newline at end of file
+testing https://bugzilla.redhat.com/show_bug.cgi?id=644985
RHEL5:
[root@rlx-0-12 ~]# rhncfg-manager diff-revisions -c test-644985 -r1 -r15 /tmp/config.cfg
Red Hat Network username: admin
Password: 
--- /tmp/config.cfg	2011-01-20 10:17:37	attributes: -rw-r--r-- root root root:object_r:unconfined_t	config channel: test-644985	revision: 1
--- /tmp/config.cfg	2011-01-20 10:17:37	attributes: -rw-r--r-- root root unconfined_u:object_r:httpd_sys_content_t:s0	config channel: test-644985	revision: 15
@@ -1 +1 @@
-https://bugzilla.redhat.com/show_bug.cgi?id=644985
\ No newline at end of file
+testing https://bugzilla.redhat.com/show_bug.cgi?id=644985
RHEL6:

[root@ibm-z10-15 ~]# rhncfg-manager diff-revisions -c test-644985 -r1 -r15 /tmp/config.cfg
--- /tmp/config.cfg	2011-01-20 10:17:37	attributes: -rw-r--r-- root root root:object_r:unconfined_t	config channel: test-644985	revision: 1
--- /tmp/config.cfg	2011-01-20 10:17:37	attributes: -rw-r--r-- root root unconfined_u:object_r:httpd_sys_content_t:s0	config channel: test-644985	revision: 15
@@ -1 +1 @@
-https://bugzilla.redhat.com/show_bug.cgi?id=644985
\ No newline at end of file
+testing https://bugzilla.redhat.com/show_bug.cgi?id=644985

Comment 14 errata-xmlrpc 2011-03-07 09:23:41 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0323.html