Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 545851 Details for
Bug 765816
[RFE] - Add an option into rhncfg-manager to allow file/directory to be uploaded without setting a SELinux context
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh90 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch proposed
0001-765816-Added-the-option-selinux-context-which-allows.patch (text/plain), 3.20 KB, created by
Marcelo Moreira de Mello
on 2011-12-12 18:17:49 UTC
(
hide
)
Description:
Patch proposed
Filename:
MIME Type:
Creator:
Marcelo Moreira de Mello
Created:
2011-12-12 18:17:49 UTC
Size:
3.20 KB
patch
obsolete
>From: Marcelo Moreira de Mello <mmello@redhat.com> >Date: Mon, 12 Dec 2011 15:53:23 -0200 >Subject: [PATCH 1/2] 765816 - Added the option --selinux-context to rhncfg-manager which > allows to overwrite the SELinux context from a file > >--- > .../tools/rhncfg/config_management/rhncfg_add.py | 13 ++++++++++++- > .../rhncfg/config_management/rpc_repository.py | 7 ++++++- > 2 files changed, 18 insertions(+), 2 deletions(-) > >diff --git a/client/tools/rhncfg/config_management/rhncfg_add.py b/client/tools/rhncfg/config_management/rhncfg_add.py >index b88fbc1..ec68a86 100644 >--- a/client/tools/rhncfg/config_management/rhncfg_add.py >+++ b/client/tools/rhncfg/config_management/rhncfg_add.py >@@ -48,6 +48,10 @@ class Handler(handler_base.HandlerBase): > '-i', '--ignore-missing', action="store_true", > help="Ignore missing local files", > ), >+ handler_base.HandlerBase._option_class( >+ '--selinux-context', action="store_true", >+ help="Overwrite the SELinux context", >+ ), > ] > > def run(self): >@@ -110,13 +114,20 @@ class Handler(handler_base.HandlerBase): > > delim_start = self.options.delim_start > delim_end = self.options.delim_end >+ >+ selinux_ctx = None >+ if type(self.options.selinux_context) != None: >+ selinux_ctx = self.options.selinux_context >+ else: >+ selinux_ctx = '' > > for (local_file, remote_file) in files_to_push: > try: > r.put_file(channel, remote_file, local_file, > is_first_revision=self.is_first_revision, > delim_start=delim_start, >- delim_end=delim_end) >+ delim_end=delim_end, >+ selinux_ctx=selinux_ctx) > except cfg_exceptions.RepositoryFileExistsError, e: > log_error("Error: %s is already in channel %s" % > (remote_file, channel)) >diff --git a/client/tools/rhncfg/config_management/rpc_repository.py b/client/tools/rhncfg/config_management/rpc_repository.py >index 2206db1..907ff89 100644 >--- a/client/tools/rhncfg/config_management/rpc_repository.py >+++ b/client/tools/rhncfg/config_management/rpc_repository.py >@@ -135,7 +135,7 @@ class Repository(repository.RPC_Repository): > > def put_file(self, config_channel, repopath, localfile=None, > is_first_revision=None, old_revision=None, delim_start=None, >- delim_end=None): >+ delim_end=None, selinux_ctx=None): > """ > Insert a given file into the repo, overwriting if necessary. > localfile defaults to the repopath >@@ -151,6 +151,11 @@ class Repository(repository.RPC_Repository): > error_msg = "%s too large (%s bytes, %s bytes max allowed)" > raise cfg_exceptions.ConfigFileTooLargeError(error_msg % (localfile, params['size'], max_file_size)) > >+ if type(selinux_ctx) == str: >+ params.update({ >+ 'selinux_ctx' : selinux_ctx, >+ )} >+ > params.update({ > 'session' : self.session, > 'config_channel' : config_channel, >-- >1.7.7.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 765816
:
545851
|
545853
|
546276