home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / aix / 8880 < prev    next >
Encoding:
Internet Message Format  |  1992-08-17  |  3.1 KB

  1. Xref: sparky comp.unix.aix:8880 comp.windows.x:15336
  2. Newsgroups: comp.unix.aix,comp.windows.x
  3. Path: sparky!uunet!destroyer!gumby!yale!mintaka.lcs.mit.edu!eswu
  4. From: eswu@expo.lcs.mit.edu (Eng-Shien Wu)
  5. Subject: Re: can't connect to Xserver (was Re: X11R5)
  6. Message-ID: <eswu.714103011@rsx.lcs.mit.edu>
  7. Sender: news@mintaka.lcs.mit.edu
  8. Organization: X Consortium, MIT Laboratory for Computer Science
  9. References: <92227.090057CALT@SLACVM.SLAC.STANFORD.EDU> <1992Aug17.101455.122954@rrz.uni-koeln.de>
  10. Date: Tue, 18 Aug 1992 01:56:51 GMT
  11. Lines: 91
  12.  
  13. se@IKP.Uni-Koeln.DE (Stefan Esser) writes:
  14.  
  15. >Does anybody know what's wrong with opening a UNIX domain 
  16. >socket to the server (MITSHM got compiled in as well ...) ?
  17.  
  18. -----------------------------------------------------------------------------
  19. The socket address structure changed in AIX3.2. This is a temporary
  20. patch to fix it. Apply to XConnDis.c. Save the original XConnDis.c in
  21. case the real patch shows up in a MIT public fix.
  22. -----------------------------------------------------------------------------
  23.  
  24. Date: Wed, 11 Mar 92 15:03:42 PST
  25. From: Minh Tran-Le <TRANLE@intellicorp.com>
  26. Subject: Xlib: unaddr not initialized correctly in MakeUNIXSocketConnection.
  27. Reply-to: tranle@intellicorp.com
  28.  
  29. ### bug number:   5045
  30. ### area:         Xlib
  31. ### severity:     low
  32. ### comments:     
  33.  
  34. VERSION:
  35.     R5, public-patch-9
  36.  
  37. CLIENT MACHINE and OPERATING SYSTEM:
  38.     IBM RS6000/AIX 3.2
  39.  
  40. DISPLAY TYPE:
  41.     SkyWay (gda0)
  42.  
  43. WINDOW MANAGER:
  44.     mwm
  45.  
  46. COMPILER:
  47.     native cc
  48.  
  49. AREA:
  50.     Xlib
  51.  
  52. SYNOPSIS:
  53.     The structure unaddr is not initialized correctly in the function
  54.     MakeUNIXSocketConnection.
  55.  
  56. DESCRIPTION:
  57.     The initialization of the unaddr.sun_len is not done in the
  58.     the function MakeUNIXSocketConnection().  The sun_len field
  59.     should be set to the length of the sun_path field.
  60.  
  61.     And the computation of addrlen the length of the sockaddr structure
  62.     is also wrong because it assume that the structure has only 2
  63.     field sun_family and sun_path.
  64.  
  65. REPEAT BY:
  66.     Compile Xlib under AIX 3.2 and all the clients will fail to open
  67.     the display :0.0.
  68.  
  69. SAMPLE FIX:
  70.     Here is a context diff for my changes to mit/lib/XConnDis.c.
  71.     The setting of unaddr.sun_len should really be conditionalized
  72.     for AIX V3.2.
  73.  
  74. *** XConnDis.c-    Fri Sep 13 18:20:28 1991
  75. --- XConnDis.c    Wed Mar 11 11:29:51 1992
  76. ***************
  77. *** 442,450 ****
  78.   
  79.       unaddr.sun_family = AF_UNIX;
  80.       sprintf (unaddr.sun_path, "%s%d", X_UNIX_PATH, idisplay);
  81.   
  82.       addr = (struct sockaddr *) &unaddr;
  83. !     addrlen = strlen(unaddr.sun_path) + sizeof(unaddr.sun_family);
  84.   
  85.   #ifdef hpux /* this is disgusting */
  86.       ounaddr.sun_family = AF_UNIX;
  87. --- 442,451 ----
  88.   
  89.       unaddr.sun_family = AF_UNIX;
  90.       sprintf (unaddr.sun_path, "%s%d", X_UNIX_PATH, idisplay);
  91. +     unaddr.sun_len = strlen(unaddr.sun_path);
  92.   
  93.       addr = (struct sockaddr *) &unaddr;
  94. !     addrlen = (sizeof(unaddr) - sizeof(unaddr.sun_path) + unaddr.sun_len);
  95.   
  96.   #ifdef hpux /* this is disgusting */
  97.       ounaddr.sun_family = AF_UNIX;
  98.  
  99. -------
  100.  
  101. --
  102. Eng-Shien Wu (eswu@expo.lcs.mit.edu)
  103. IBM Graphic Systems/MIT X Consortium
  104.