FC4: system-config-securitylevel dies on unknown service
Patrick J. Kobly
patrick at kobly.com
Wed Jun 15 20:14:41 UTC 2005
G'day,
Quick note... the FC4 system-config-security-level dies with the
attached traceback if any services are marked as permitted but do not
exist in /etc/services. Also attached is a diff that fixes it.
PK
--- traceback ---
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
--- end traceback ---
--- /usr/share/system-config-securitylevel/securitylevel.py.old 2005-05-18 12:06:05.000000000 -0600
+++ /usr/share/system-config-securitylevel/securitylevel.py 2005-06-15 14:09:09.000000000 -0600
@@ -350,7 +350,11 @@
elif service == '25' or service == 'smtp':
service = 'smtp'
else:
- protoname = socket.getservbyport(int(service), protocol)
+ try:
+ protoname = socket.getservbyport(int(service), protocol)
+ except:
+ protoname=service
+
portsList.append(protoname + ":" + protocol)
continue
servicesList.append(service)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20050615/4e980838/attachment-0001.sig>
More information about the fedora-list
mailing list