import socket socket.getservbyport(13) This will print either 'daytime' (success) or an exception (socket.error:
https://bugzilla.novell.com/show_bug.cgi?id=374990 Summary: getservbyport() broken in 10.3 (glibc regression?) Product: openSUSE 10.3 Version: Final Platform: i686 OS/Version: openSUSE 10.3 Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: adaugherity@tamu.edu QAContact: qa@suse.de Found By: --- While attempting to compile Python 2.4 (for Zope, etc.) some socket tests failed, specifically the test comparing the results of getservbyname() and getservbyport(). Digging deeper, I discovered it's not a Python problem at all, but a bug in glibc that is simply reflected in Python. I have attached a simple C program illustrating the bug. On systems with a working getservbyport() syscall, it should print the following: andrew@virt-apache-02:~$ ./a.out found service daytime for port 13/(null) found service daytime for port 13/tcp found service daytime for port 13/udp On 10.3, the call fails: andrew@test-app-01:~> ./a.out not found in services: port 13/(null) not found in services: port 13/tcp not found in services: port 13/udp With an 11.0 alpha 3 live CD, it's broken in a different way: andrew@linux:~> ./a.out found service spr-itunes for port 0 found service spr-itunes for port 0/tcp not found in services: port 13/udp You can also test for the problem with two lines in an interactive session of python: port/proto not found). OpenSUSE 10.3 (and 11.0 alpha3) are the only OSes I've found this to be broken on. It works correctly in 10.2, as well as on SLSE 10sp1, Ubuntu 7.10 (glibc 2.6.1), RHEL4 (glibc 2.3.4), and even on other platforms such as FreeBSD and OpenSolaris. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.