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:


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.