Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 166725 - system-config-securitylevel fails to start if unknown service is listed in "Other ports" field
Summary: system-config-securitylevel fails to start if unknown service is listed in "O...
Status: CLOSED DUPLICATE of bug 157620
Alias: None
Product: Fedora
Classification: Fedora
Component: system-config-securitylevel
Version: 4
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Chris Lumens
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2005-08-24 22:11 UTC by Charles Simpson
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2005-08-25 13:35:05 UTC

Attachments (Terms of Use)
Patch to fix the problem described in the bug (deleted)
2005-08-24 22:45 UTC, Charles Simpson
no flags Details | Diff

Description Charles Simpson 2005-08-24 22:11:16 UTC
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/", line 18, in ?
  File "/usr/share/system-config-securitylevel/", line 453, in stand_alone
  File "/usr/share/system-config-securitylevel/", line 353, in readFile
    protoname = socket.getservbyport(int(service), protocol)
socket.error: port/proto not found

Comment 1 Charles Simpson 2005-08-24 22:45:29 UTC
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 13:35:05 UTC
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.