Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 679453 Details for
Bug 893065
vdsm package can not be installed on RHEL 6.4 if selinux disabled.
[?]
New
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.rh83 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]
seobject.py patch
policycoreutils-2.0.83-seobject.patch (text/plain), 4.52 KB, created by
Miroslav Grepl
on 2013-01-16 10:07:20 UTC
(
hide
)
Description:
seobject.py patch
Filename:
MIME Type:
Creator:
Miroslav Grepl
Created:
2013-01-16 10:07:20 UTC
Size:
4.52 KB
patch
obsolete
>--- policycoreutils-2.0.83/semanage/seobject.py~ 2013-01-16 10:50:53.844057919 +0100 >+++ policycoreutils-2.0.83/semanage/seobject.py 2013-01-16 11:04:38.180883450 +0100 >@@ -196,6 +196,13 @@ > else: > return raw > >+def get_valid_types(selinux_class_type): >+ valid_types = [] >+ if selinux.is_selinux_enabled(): >+ valid_types = setools.seinfo(setools.ATTRIBUTE,selinux_class_type)[0]["types"] >+ >+ return valid_types >+ > class semanageRecords: > transaction = False > handle = None >@@ -950,7 +957,7 @@ > print "%-15s %s" % (k, ddict[k][3]) > > class portRecords(semanageRecords): >- valid_types = setools.seinfo(setools.ATTRIBUTE,"port_type")[0]["types"] >+ valid_types = get_valid_types("port_type") > > def __init__(self, store = ""): > semanageRecords.__init__(self, store) >@@ -991,8 +998,9 @@ > if type == "": > raise ValueError(_("Type is required")) > >- if type not in self.valid_types: >- raise ValueError(_("Type %s is invalid, must be a port type") % type) >+ if selinux.is_selinux_enabled(): >+ if type not in self.valid_types: >+ raise ValueError(_("Type %s is invalid, must be a port type") % type) > > ( k, proto_d, low, high ) = self.__genkey(port, proto) > >@@ -1053,8 +1061,9 @@ > else: > raise ValueError(_("Requires setype")) > >- if setype and setype not in self.valid_types: >- raise ValueError(_("Type %s is invalid, must be a port type") % setype) >+ if selinux.is_selinux_enabled(): >+ if setype and setype not in self.valid_types: >+ raise ValueError(_("Type %s is invalid, must be a port type") % setype) > > ( k, proto_d, low, high ) = self.__genkey(port, proto) > >@@ -1213,7 +1222,7 @@ > print rec > > class nodeRecords(semanageRecords): >- valid_types = setools.seinfo(setools.ATTRIBUTE,"node_type")[0]["types"] >+ valid_types = get_valid_types("node_type") > > def __init__(self, store = ""): > semanageRecords.__init__(self,store) >@@ -1239,9 +1248,10 @@ > > if ctype == "": > raise ValueError(_("SELinux node type is required")) >- >- if ctype not in self.valid_types: >- raise ValueError(_("Type %s is invalid, must be a node type") % ctype) >+ >+ if selinux.is_selinux_enabled(): >+ if ctype not in self.valid_types: >+ raise ValueError(_("Type %s is invalid, must be a node type") % ctype) > > > (rc, k) = semanage_node_key_create(self.sh, addr, mask, proto) >@@ -1317,8 +1327,9 @@ > if serange == "" and setype == "": > raise ValueError(_("Requires setype or serange")) > >- if setype and setype not in self.valid_types: >- raise ValueError(_("Type %s is invalid, must be a node type") % setype) >+ if selinux.is_selinux_enabled(): >+ if setype and setype not in self.valid_types: >+ raise ValueError(_("Type %s is invalid, must be a node type") % setype) > > (rc, k) = semanage_node_key_create(self.sh, addr, mask, proto) > if rc < 0: >@@ -1636,8 +1647,8 @@ > print "%-30s %s:%s:%s " % (k,ddict[k][0], ddict[k][1],ddict[k][2]) > > class fcontextRecords(semanageRecords): >- valid_types = setools.seinfo(setools.ATTRIBUTE,"file_type")[0]["types"] >- valid_types += setools.seinfo(setools.ATTRIBUTE,"device_node")[0]["types"] >+ valid_types = get_valid_types("file_type") >+ valid_types += get_valid_types("device_node") > > def __init__(self, store = ""): > semanageRecords.__init__(self, store) >@@ -1735,8 +1746,9 @@ > if type == "": > raise ValueError(_("SELinux Type is required")) > >- if type not in self.valid_types: >- raise ValueError(_("Type %s is invalid, must be a file or device type") % type) >+ if selinux.is_selinux_enabled(): >+ if type not in self.valid_types: >+ raise ValueError(_("Type %s is invalid, must be a file or device type") % type) > > (rc, k) = semanage_fcontext_key_create(self.sh, target, file_types[ftype]) > if rc < 0: >@@ -1796,8 +1808,9 @@ > raise ValueError(_("Requires setype, serange or seuser")) > self.validate(target) > >- if setype and setype not in self.valid_types: >- raise ValueError(_("Type %s is invalid, must be a port type") % setype) >+ if selinux.is_selinux_enabled(): >+ if setype and setype not in self.valid_types: >+ raise ValueError(_("Type %s is invalid, must be a port type") % setype) > > (rc, k) = semanage_fcontext_key_create(self.sh, target, file_types[ftype]) > if rc < 0:
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 893065
: 679453