Bug 765816 - [RFE] - Add an option into rhncfg-manager to allow file/directory to be uploaded without setting a SELinux context
[RFE] - Add an option into rhncfg-manager to allow file/directory to be uploa...
Status: CLOSED CURRENTRELEASE
Product: Spacewalk
Classification: Community
Component: Clients (Show other bugs)
1.6
All Linux
medium Severity medium
: ---
: ---
Assigned To: Marcelo Moreira de Mello
Red Hat Satellite QA List
:
Depends On:
Blocks: spacewalk-rfe
  Show dependency treegraph
 
Reported: 2011-12-09 09:16 EST by Marcelo Moreira de Mello
Modified: 2011-12-27 10:00 EST (History)
3 users (show)

See Also:
Fixed In Version: rhncfg-5.10.22-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 770575 (view as bug list)
Environment:
Last Closed: 2011-12-23 05:02:27 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Patch proposed (3.20 KB, patch)
2011-12-12 13:17 EST, Marcelo Moreira de Mello
no flags Details | Diff
Patch proposed (1.78 KB, patch)
2011-12-12 13:18 EST, Marcelo Moreira de Mello
no flags Details | Diff
Patch proposed (4.69 KB, patch)
2011-12-13 11:39 EST, Marcelo Moreira de Mello
no flags Details | Diff

  None (edit)
Description Marcelo Moreira de Mello 2011-12-09 09:16:29 EST
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:
Comment 1 Marcelo Moreira de Mello 2011-12-11 08:41:06 EST
  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.
Comment 2 Marcelo Moreira de Mello 2011-12-12 13:17:49 EST
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
Comment 3 Marcelo Moreira de Mello 2011-12-12 13:18:33 EST
Created attachment 545853 [details]
Patch proposed
Comment 4 Marcelo Moreira de Mello 2011-12-13 11:39:11 EST
Created attachment 546276 [details]
Patch proposed

Hello, 

 Per Mirek notes, follow a new better looking patch. 

 Best, 
mmello
Comment 5 Miroslav Suchý 2011-12-13 16:29:45 EST
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
Comment 6 Milan Zazrivec 2011-12-23 05:02:27 EST
Spacewalk 1.6 has been released.

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