Build break in xdm.

Alan Coopersmith Alan.Coopersmith at Sun.COM
Wed Nov 9 13:31:03 PST 2005


mcnichol at austin.ibm.com wrote:
> I noticed that also.  This is looking pretty strange right now.
> 
> While I'm poking around my compiler flagged a couple of other problems:
> 
> 
>         xlc_r -O -D__STR31__ -DNDEBUG      -I../.. -I../../exports/include   -DSYSV -DAIXV3 -DAIXV4 -DAIXV5 -D_ALL_SOURCE  -DFUNCPROTO=15   -DBINDIR=\"/xorg/X1132/bin\" -DXDMDIR=\"/xorg/X1132/lib/X11/xdm\"      -DHASXDMAUTH     -DUSE_PAM -DTCPCONN -DUNIXCONN   -DHAS_STICKY_DIR_BIT -DHAS_FCHOWN -DIPv6  -DGREET_USER_STATIC      -DOSMAJORVERSION=5  -DOSMINORVERSION=3     -DXPM        -c access.c
> "access.c", line 260.38: 1506-1298 (W) The subscript 256 is out of range. The valid range is 0 to 255.

That code should be safe on most machines, since it's checking that the 
subscript is in range:

     204 #define WORD_LEN    256
     205 static char     wordBuffer[WORD_LEN];
[...]
     260             if (wordp < &(wordBuffer[WORD_LEN]))
     261               *wordp++ = c;

I suppose 'if (wordp <= &(wordBuffer[WORD_LEN - 1]))' would be just as effective
without flagging compiler warnings.

> 
> 
>         xlc_r -O -D__STR31__ -DNDEBUG      -I../.. -I../../exports/include   -DSYSV -DAIXV3 -DAIXV4 -DAIXV5 -D_ALL_SOURCE  -DFUNCPROTO=15   -DBINDIR=\"/xorg/X1132/bin\" -DXDMDIR=\"/xorg/X1132/lib/X11/xdm\"      -DHASXDMAUTH     -DUSE_PAM -DTCPCONN -DUNIXCONN   -DHAS_STICKY_DIR_BIT -DHAS_FCHOWN -DIPv6  -DGREET_USER_STATIC      -DOSMAJORVERSION=5  -DOSMINORVERSION=3     -DXPM        -c verify.c
> "verify.c", line 183.9: 1506-196 (W) Initialization between types "int(*)(int,struct pam_message**,struct pam_response**,void*)" and "int(*)(int,const struct pam_message**,struct pam_response**,void*)" is not allowed.


Looks like your PAM converstation definition doesn't match what
most other OS'es use - perhaps adding an || defined (AIX) to
this #ifdef in verify.c would solve it?

     127 static int PAM_conv (int num_msg,
     128 #ifdef sun
     129                      struct pam_message **msg,
     130 #else
     131                      const struct pam_message **msg,
     132 #endif
     133                      struct pam_response **resp,
     134                      void *appdata_ptr) {

-- 
	-Alan Coopersmith-           alan.coopersmith at sun.com
	 Sun Microsystems, Inc. - X Window System Engineering



More information about the xorg mailing list