Bug 166725 - system-config-securitylevel fails to start if unknown service is listed in "Other ports" field
system-config-securitylevel fails to start if unknown service is listed in "O...
Status: CLOSED DUPLICATE of bug 157620
Product: Fedora
Classification: Fedora
Component: system-config-securitylevel (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Chris Lumens
Depends On:
  Show dependency treegraph
Reported: 2005-08-24 18:11 EDT by Charles Simpson
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-08-25 09:35:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch to fix the problem described in the bug (689 bytes, patch)
2005-08-24 18:45 EDT, Charles Simpson
no flags Details | Diff

  None (edit)
Description Charles Simpson 2005-08-24 18:11:16 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

Description of problem:
system-config-securitylevel does not start if a port is given in the "Other ports" field of the "Firewall Options."  If the port number is not found in /etc/services, system-config-securitylevel fails to start with the traceback included below.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Start system-config-securitylevel
2. Add a port that does not exist in /etc/services to "Other ports" field.  Specifically, port 411 can be used (ie, 411:tcp).
3. Press "OK," save the changes, and quit system-config-securitylevel
4. Attempt to start system-config-securitylevel again.

Actual Results:  system-config-securitylevel fails to start, giving the traceback below.

Expected Results:  system-config-securitylevel should start and leave the port number instead of trying to look up the service.

Additional info:

Traceback (most recent call last):
  File "/usr/share/system-config-securitylevel/system-config-securitylevel.py", line 18, in ?
  File "/usr/share/system-config-securitylevel/securitylevel.py", line 453, in stand_alone
  File "/usr/share/system-config-securitylevel/securitylevel.py", line 353, in readFile
    protoname = socket.getservbyport(int(service), protocol)
socket.error: port/proto not found
Comment 1 Charles Simpson 2005-08-24 18:45:29 EDT
Created attachment 118096 [details]
Patch to fix the problem described in the bug

The patch is very simple; if socket.getservbyport() throws a socket.error
exception (ie, if the service is not found in /etc/services), then the original
port number is displayed rather than the name of the service.
Comment 2 Charles Simpson 2005-08-25 09:35:05 EDT
Bug was already fixed in update to system-config-securitylevel.  I should have
updated the package and checked bugzilla for closed bugs first.

*** This bug has been marked as a duplicate of 157620 ***

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