Bug 649482 - Regression in semanage_commit() API
Regression in semanage_commit() API
Status: CLOSED NEXTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libsemanage (Show other bugs)
6.0
Unspecified Linux
low Severity medium
: rc
: ---
Assigned To: Daniel Walsh
BaseOS QE Security Team
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-11-03 15:48 EDT by Stephen Gallagher
Modified: 2013-09-17 11:32 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-17 11:32:47 EDT
Type: ---
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 Stephen Gallagher 2010-11-03 15:48:53 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):
libsemanage-2.0.43-4.el6

How reproducible:
Every time


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
  
Actual results:
Returns zero on success

Expected results:
Returns a policy sequence number > 0

Additional info:
(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.
Comment 2 RHEL Product and Program Management 2011-01-07 10:56:45 EST
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
representative.

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