diff options
author | Eric Anholt <anholt@freebsd.org> | 2004-07-06 00:44:39 +0000 |
---|---|---|
committer | Eric Anholt <anholt@freebsd.org> | 2004-07-06 00:44:39 +0000 |
commit | 616e67f2b69018a7c6ffd91f1742ece51c4c5f78 (patch) | |
tree | e657c55edb343ae37bee58f39e31777f061b5249 | |
parent | c5072fb61a23d4b4063d9c2f6043c23ff200af1b (diff) |
XFree86 bugzilla #1376: xdm opens random tcp sockets
"Even when DisplayManager.requestPort is set to 0, xdm will open a
chooserFd tcp socket on all interfaces. This apparently cannot be
disabled by configuration and presents a possible security risk. Older
versions of xdm/socket.c appear to have checked and aborted if
request_port == 0, but the current one does not..."
-rw-r--r-- | socket.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $XdotOrg$ */ +/* $XdotOrg: xc/programs/xdm/socket.c,v 1.2 2004/04/23 19:54:42 eich Exp $ */ /* $Xorg: socket.c,v 1.4 2001/02/09 02:05:40 xorgcvs Exp $ */ /* @@ -67,6 +67,9 @@ CreateWellKnownSockets (void) char *name = localHostname (); registerHostname (name, strlen (name)); + if (request_port == 0) + return; + #if defined(IPv6) && defined(AF_INET6) chooserFd = socket (AF_INET6, SOCK_STREAM, 0); if (chooserFd == -1) |