Bug 765816 - [RFE] - Add an option into rhncfg-manager to allow file/directory to be uploaded without setting a SELinux context
Summary: [RFE] - Add an option into rhncfg-manager to allow file/directory to be uploa...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Clients
Version: 1.6
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Marcelo Moreira de Mello
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: spacewalk-rfe
TreeView+ depends on / blocked
 
Reported: 2011-12-09 14:16 UTC by Marcelo Moreira de Mello
Modified: 2011-12-27 15:00 UTC (History)
3 users (show)

Fixed In Version: rhncfg-5.10.22-1
Clone Of:
: 770575 (view as bug list)
Environment:
Last Closed: 2011-12-23 10:02:27 UTC
Embargoed:


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

Description Marcelo Moreira de Mello 2011-12-09 14:16:29 UTC
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 13:41:06 UTC
  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 18:17:49 UTC
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 18:18:33 UTC
Created attachment 545853 [details]
Patch proposed

Comment 4 Marcelo Moreira de Mello 2011-12-13 16:39:11 UTC
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 21:29:45 UTC
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 Zázrivec 2011-12-23 10:02:27 UTC
Spacewalk 1.6 has been released.


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