Red Hat Bugzilla – Bug 649482
Regression in semanage_commit() API
Last modified: 2013-09-17 11:32:47 EDT
Description of problem:
In RHEL5, semanage_commit() would return -1 on error or the new policy sequence number (> 0) on success.
However, in RHEL6, this has changed to returning 0 on success, but the header file still indicates that it should be returning a policy number.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Write a program that uses the semanage_commit() function
2. Check the return code of this function during success and failure
Returns zero on success
Returns a policy sequence number > 0
(03:40:15 PM) eparis: sgallagh: in RHEL5 we always called a function called semanage_install_sandbox() which returned the policy number. Between RHEL5 and RHEL6 we only called that function if there were changes.
(03:40:27 PM) sgallagh: ahh
(03:40:59 PM) eparis: best fix would be to move the policy number lookup from that function up into semanage_direct_commit()
Given that this changes the expected return values of a public function, I think this bug should be catagorized as a regression.
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support