home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.unix.aix:8880 comp.windows.x:15336
- Newsgroups: comp.unix.aix,comp.windows.x
- Path: sparky!uunet!destroyer!gumby!yale!mintaka.lcs.mit.edu!eswu
- From: eswu@expo.lcs.mit.edu (Eng-Shien Wu)
- Subject: Re: can't connect to Xserver (was Re: X11R5)
- Message-ID: <eswu.714103011@rsx.lcs.mit.edu>
- Sender: news@mintaka.lcs.mit.edu
- Organization: X Consortium, MIT Laboratory for Computer Science
- References: <92227.090057CALT@SLACVM.SLAC.STANFORD.EDU> <1992Aug17.101455.122954@rrz.uni-koeln.de>
- Date: Tue, 18 Aug 1992 01:56:51 GMT
- Lines: 91
-
- se@IKP.Uni-Koeln.DE (Stefan Esser) writes:
-
- >Does anybody know what's wrong with opening a UNIX domain
- >socket to the server (MITSHM got compiled in as well ...) ?
-
- -----------------------------------------------------------------------------
- The socket address structure changed in AIX3.2. This is a temporary
- patch to fix it. Apply to XConnDis.c. Save the original XConnDis.c in
- case the real patch shows up in a MIT public fix.
- -----------------------------------------------------------------------------
-
- Date: Wed, 11 Mar 92 15:03:42 PST
- From: Minh Tran-Le <TRANLE@intellicorp.com>
- Subject: Xlib: unaddr not initialized correctly in MakeUNIXSocketConnection.
- Reply-to: tranle@intellicorp.com
-
- ### bug number: 5045
- ### area: Xlib
- ### severity: low
- ### comments:
-
- VERSION:
- R5, public-patch-9
-
- CLIENT MACHINE and OPERATING SYSTEM:
- IBM RS6000/AIX 3.2
-
- DISPLAY TYPE:
- SkyWay (gda0)
-
- WINDOW MANAGER:
- mwm
-
- COMPILER:
- native cc
-
- AREA:
- Xlib
-
- SYNOPSIS:
- The structure unaddr is not initialized correctly in the function
- MakeUNIXSocketConnection.
-
- DESCRIPTION:
- The initialization of the unaddr.sun_len is not done in the
- the function MakeUNIXSocketConnection(). The sun_len field
- should be set to the length of the sun_path field.
-
- And the computation of addrlen the length of the sockaddr structure
- is also wrong because it assume that the structure has only 2
- field sun_family and sun_path.
-
- REPEAT BY:
- Compile Xlib under AIX 3.2 and all the clients will fail to open
- the display :0.0.
-
- SAMPLE FIX:
- Here is a context diff for my changes to mit/lib/XConnDis.c.
- The setting of unaddr.sun_len should really be conditionalized
- for AIX V3.2.
-
- *** XConnDis.c- Fri Sep 13 18:20:28 1991
- --- XConnDis.c Wed Mar 11 11:29:51 1992
- ***************
- *** 442,450 ****
-
- unaddr.sun_family = AF_UNIX;
- sprintf (unaddr.sun_path, "%s%d", X_UNIX_PATH, idisplay);
-
- addr = (struct sockaddr *) &unaddr;
- ! addrlen = strlen(unaddr.sun_path) + sizeof(unaddr.sun_family);
-
- #ifdef hpux /* this is disgusting */
- ounaddr.sun_family = AF_UNIX;
- --- 442,451 ----
-
- unaddr.sun_family = AF_UNIX;
- sprintf (unaddr.sun_path, "%s%d", X_UNIX_PATH, idisplay);
- + unaddr.sun_len = strlen(unaddr.sun_path);
-
- addr = (struct sockaddr *) &unaddr;
- ! addrlen = (sizeof(unaddr) - sizeof(unaddr.sun_path) + unaddr.sun_len);
-
- #ifdef hpux /* this is disgusting */
- ounaddr.sun_family = AF_UNIX;
-
- -------
-
- --
- Eng-Shien Wu (eswu@expo.lcs.mit.edu)
- IBM Graphic Systems/MIT X Consortium
-