Bug 530353

Summary: semanage could have a switch not to complain when port value is already set
Product: [Fedora] Fedora Reporter: Daniel Walsh <dwalsh>
Component: policycoreutilsAssignee: Daniel Walsh <dwalsh>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: dwalsh, jpazdziora, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 489922 Environment:
Last Closed: 2011-03-09 21:44:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 489922    
Bug Blocks:    

Comment 1 Daniel Walsh 2009-10-28 12:59:47 UTC
Why not just add the following to your script.

/usr/sbin/semanage port -l | grep ^jabber_interserver_port_t.*tcp.*5347 >
/dev/null
if [ $? .ne 0 ]; then
 /usr/sbin/semanage port -a -t jabber_interserver_port_t -p tcp 5347
fi

Comment 2 Jan Pazdziora 2009-10-28 15:53:24 UTC
Oh, I could definitely do that. I just felt that if semanage was able to do it
directly, it would decrease race condition when the value is deleted between
those two semanage invocations, plus the scripts calling semanage might be a
bit simpler (one line instead of cca four).

So it's just about making it easier for callers, not adding functionality which
would not be available otherwise.

Comment 3 Daniel Walsh 2009-10-28 17:21:46 UTC
The problem is this is checked in a lowlevel library.   And I could see the justification of this in all of the semanage calls.  

Since tools like useradd don't ave this, I think it would be a lot of work to do this for semanage.

useradd pwalsh
useradd: user 'pwalsh' already exists

Comment 4 Bug Zapper 2009-11-16 14:03:07 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 5 Bug Zapper 2010-11-04 09:15:20 UTC
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '12'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 12's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 12 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping