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...
Keywords:
Status: CLOSED DUPLICATE of bug 157620
Alias: None
Product: Fedora
Classification: Fedora
Component: system-config-securitylevel
Version: 4
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Chris Lumens
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
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:
Clone Of:
Environment:
Last Closed: 2005-08-25 13:35:05 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Patch to fix the problem described in the bug (689 bytes, patch)
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):
system-config-securitylevel-1.5.8-1

How reproducible:
Always

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 ?
    app.stand_alone()
  File "/usr/share/system-config-securitylevel/securitylevel.py", line 453, in stand_alone
    self.readFile()
  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 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.