There is an old bug report on http://bugs.debian.org/#67086 :
``xdm seems to be passing the TCP socket it opens to child processes
invoked from the Xsetup script.
This should be fixed.
sobolev:/home/roessler# lsof -i tcp:1169
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
xdm 13471 root 5u IPv4 1325982 TCP *:1169 (LISTEN)
xdm 14419 root 5u IPv4 1325982 TCP *:1169 (LISTEN)
xconsole. 14428 root 5u IPv4 1325982 TCP *:1169 (LISTEN)''
I can still reproduce it. Are Xsetup script expected to inherit this descriptor?
I wouldn't expect Xsetup children to inherit any open listening TCP sockets,
but I also wouldn't expect xdm to be listening on TCP port 1169. (The only
port I expect xdm to be listening on is UDP port 177, which is the XDMCP
protocol port, and XDMCP is UDP only.)
Any idea why your xdm is listening on that TCP port?
socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = 3 listen(3, 5) = 0 It looks like it's the chooser socket (xdm/socket.c:CreateWellKnownSockets())
Bugzilla Upgrade Mass Bug Change
NEEDSINFO state was removed in Bugzilla 3.x, reopening any bugs previously listed as NEEDSINFO.
Created attachment 14644 [details] [review]
Don't leak sockets in started scripts
This adds a call to DestroyWellKnownSockets() so as to properly close the chooser fd, as commented below CleanUpChild() in other places.
Note: no, we don't want to register in CloseOnFork, because in the chooser case, we _need_ that socket (see StartDisplay which calls RunChooser after calling CleanUpChild)
Thanks for the patch - applied to git master for xdm 1.1.8