RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 881594 - sepolicy communicate tracebacks
Summary: sepolicy communicate tracebacks
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: policycoreutils
Version: 7.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Daniel Walsh
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks: 917049
TreeView+ depends on / blocked
 
Reported: 2012-11-29 07:36 UTC by Milos Malik
Modified: 2014-06-18 02:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 12:35:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Milos Malik 2012-11-29 07:36:02 UTC
Description of problem:


Version-Release number of selected component (if applicable):
policycoreutils-2.1.13-34.el7.x86_64
policycoreutils-newrole-2.1.13-34.el7.x86_64
policycoreutils-restorecond-2.1.13-34.el7.x86_64
policycoreutils-devel-2.1.13-34.el7.x86_64
policycoreutils-sandbox-2.1.13-34.el7.x86_64
policycoreutils-python-2.1.13-34.el7.x86_64

How reproducible:
always

Steps to Reproduce:
# sepolicy communicate -s sshd_t -t sshd_t

Actual results:
Traceback (most recent call last):
  File "/usr/bin/sepolicy", line 305, in <module>
    args.func(args)
  File "/usr/bin/sepolicy", line 195, in communicate
    writable = get_types(args.source, args.tclass, args.sourceaccess.split(","))
  File "/usr/lib64/python2.7/site-packages/sepolicy/communicate.py", line 41, in get_types
    allows=search([sepolicy.ALLOW],{sepolicy.SOURCE:src,sepolicy.CLASS:tclass, sepolicy.PERMS:perm})
  File "/usr/lib64/python2.7/site-packages/sepolicy/__init__.py", line 47, in search
    dict_list = filter(lambda x: _dict_has_perms(x, perms), dict_list)
  File "/usr/lib64/python2.7/site-packages/sepolicy/__init__.py", line 47, in <lambda>
    dict_list = filter(lambda x: _dict_has_perms(x, perms), dict_list)
  File "/usr/lib64/python2.7/site-packages/sepolicy/__init__.py", line 51, in _dict_has_perms
    for perm in perms:
TypeError: expected string or Unicode object, list found

Expected results:
 * no traceback

Comment 1 Milos Malik 2012-11-29 14:13:12 UTC
# sepolicy communicate -s sshd_t -t sshd_t -c xxx
ERROR: could not find class xxx
Traceback (most recent call last):
  File "/usr/bin/sepolicy", line 305, in <module>
    args.func(args)
  File "/usr/bin/sepolicy", line 195, in communicate
    writable = get_types(args.source, args.tclass, args.sourceaccess.split(","))
  File "/usr/lib64/python2.7/site-packages/sepolicy/communicate.py", line 43, in get_types
    raise TypeError("The %s type is not allowed to %s any types" % (src, ",".join(perm)))
TypeError: The ['sshd_t'] type is not allowed to open,write any types
#

Comment 2 Daniel Walsh 2012-11-30 05:26:46 UTC
Fixed in policycoreutils-2.1.13-41.el7

Comment 4 Daniel Walsh 2013-03-14 22:17:09 UTC
Fixed in policycoreutils-2.1.14-22.el7

Comment 6 Daniel Walsh 2013-04-11 17:51:19 UTC
Fixed in policycoreutils-2.1.14-36.el7

Comment 8 Ludek Smid 2014-06-13 12:35:47 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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