Bug 866296 - semanage: not possible to feed multiple commands from stdin
semanage: not possible to feed multiple commands from stdin
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: policycoreutils (Show other bugs)
17
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-15 00:10 EDT by Matt Kinni
Modified: 2013-05-31 22:27 EDT (History)
2 users (show)

See Also:
Fixed In Version: policycoreutils-2.1.13-27.3.fc17
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-05-31 22:27:05 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Matt Kinni 2012-10-15 00:10:14 EDT
Description of problem:
Hello.  I saw a post on Dan Walsh's blog <http://danwalsh.livejournal.com/41593.html> that showed how you can process many semanage commands in one transaction like so:

semanage -S targeted -i - << _EOF
boolean -m --on allow_polyinstantiation
boolean -m --on xguest_connect_network
boolean -m --on xguest_mount_media
boolean -m --on xguest_use_bluetooth
_EOF

However, running this on my system outputs an error:

Traceback (most recent call last):
  File "/sbin/semanage", line 566, in <module>
    trans.finish()
  File "/usr/lib64/python2.7/site-packages/seobject.py", line 285, in finish
    self.commit()
  File "/usr/lib64/python2.7/site-packages/seobject.py", line 274, in commit
    semanage_set_reload(self.sh, self.reload)
TypeError: in method 'semanage_set_reload', argument 2 of type 'int'

None of the commands end up being processed.

Version-Release number of selected component (if applicable):
policycoreutils-python-2.1.11-18.fc17.x86_64

How reproducible:
Always

Steps to Reproduce:
1. run the example code above
2.
3.
  
Actual results:
semange explodes

Expected results:
works as intended

Additional info:
I'm not sure how to debug this further.  Let me know if you need anything else
Comment 1 Daniel Walsh 2013-02-08 12:41:12 EST
Fixed in policycoreutils-2.1.13-27.3.fc17
Comment 2 Fedora Update System 2013-02-08 14:28:53 EST
policycoreutils-2.1.13-27.3.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/policycoreutils-2.1.13-27.3.fc17
Comment 3 Fedora Update System 2013-02-09 06:22:21 EST
Package policycoreutils-2.1.13-27.3.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing policycoreutils-2.1.13-27.3.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-2163/policycoreutils-2.1.13-27.3.fc17
then log in and leave karma (feedback).
Comment 4 Fedora Update System 2013-05-31 22:27:05 EDT
policycoreutils-2.1.13-27.3.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

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