Description of problem: Add an option into rhncfg-client to allow file/directory to be uploaded without setting a SELinux context. i.e. --no-selinux-context | --with-selinux-context=XXXXX Version-Release number of selected component (if applicable): Spacewalk 1.6 How reproducible: 100% Actual results: Currently not able to update a file into a configuration channel without setting an SELinux context. Expected results: Be able to update a file into a configuration channel without setting an SELinux context. Additional info:
POC: # rhncfg-manager add -c bz-selinux --selinux-context="" /etc/hosts 2011-12-11 11:19:11 rpc_repository.__init__: 2011-12-11 11:19:11 repository.__init__: server url https://spacewalk.example.com/CONFIG-MANAGEMENT-TOOL 2011-12-11 11:19:11 repository.__init__: ca cert /usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT 2011-12-11 11:19:12 rpc_repository.assert_repo_health: 2011-12-11 11:19:12 rhncfg_add.run: 2011-12-11 11:19:12 rpc_repository.config_channel_exists: bz-selinux 2011-12-11 11:19:12 rpc_repository.list_config_channels: Pushing to channel bz-selinux: 2011-12-11 11:19:12 rpc_repository._get_maximum_file_size: 2011-12-11 11:19:12 rpc_repository.put_file: 2011-12-11 11:19:12 rpc_repository._get_default_delimiters: DEBUG --> params {'size': 158, 'config_channel': 'bz-selinux', 'group': 'root', 'ctime': 1323570931, 'session': '160708x5efbb6e0a95f2c', 'delim_start': '{|', 'file_contents': 'MTI3LjAXXX', 'config_file_type_id': 1, 'delim_end': '|}', 'enc64': 1, 'user': 'root', 'mtime': 1263302902, 'path': '/etc/hosts', 'selinux_ctx': '', 'mode': 644} Local file /etc/hosts -> remote file /etc/hosts 2011-12-11 11:19:12 rpc_repository.cleanup: Working into this.
Created attachment 545851 [details] Patch proposed Hello team, Sent to spacewalk-devel maillist the proposed patches to allow a file to be uploaded overwriting the SELinux context. Mail thread: https://www.redhat.com/archives/spacewalk-devel/2011-December/msg00035.html Best Regards, mmello
Created attachment 545853 [details] Patch proposed
Created attachment 546276 [details] Patch proposed Hello, Per Mirek notes, follow a new better looking patch. Best, mmello
commited to spacewalk.git as: * 31c8dce 765816 - Added the option --selinux-context to rhncfg-manager which allows to overwrite the SELinux context from a fil
Spacewalk 1.6 has been released.