Re: [osol-code] size_t and gssapi.h

2008-11-13 Thread Neale Ferguson
D'oh, I must have had the -fresult-prediction switch set! Thanks for picking that up! On 11/13/08 3:58 PM, "James Carlson" <[EMAIL PROTECTED]> wrote: > > A quick glance at the code shows that this is an output-only > parameter, so that should actually have been: > > x= packet_get_string(&gssL

Re: [osol-code] size_t and gssapi.h

2008-11-13 Thread James Carlson
Neale Ferguson writes: > uint_t gssLen; > > : > : > gssLen = mic_tok.Length; > x= packet_get_string(&gssLen); > : A quick glance at the code shows that this is an output-only parameter, so that should actually have been: x= packet_get_string(&gssLen); mic_tok.Length = gssLen; See: pac

Re: [osol-code] size_t and gssapi.h

2008-11-13 Thread Neale Ferguson
So .. uint_t gssLen; : : gssLen = mic_tok.Length; x= packet_get_string(&gssLen); : As for the getopt() culprits there are 20 or more files. I'll check my diffs and record the file names. Neale -- This message posted from opensolaris.org ___ ope

Re: [osol-code] size_t and gssapi.h

2008-11-13 Thread James Carlson
Neale Ferguson writes: > 3rd option: should the parameter to packet_get_string() simply be cast to > uint_t *? That won't work, which is why I called the code that does this "scary." It won't work because in LP64, uint_t and size_t objects have different sizes. -- James Carlson, Solaris Networ

Re: [osol-code] size_t and gssapi.h

2008-11-13 Thread James Carlson
Neale Ferguson writes: > I should've asked the question: (a) should gss_buffer_desc have uint32_t > length or (b) should packet_get_string() use size_t? I think the latter is > probably the more correct option. There's another option: (c) should the handful of callers who errantly pass a size_t

Re: [osol-code] size_t and gssapi.h

2008-11-13 Thread Neale Ferguson
3rd option: should the parameter to packet_get_string() simply be cast to uint_t *? -- This message posted from opensolaris.org ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-c

Re: [osol-code] size_t and gssapi.h

2008-11-13 Thread Neale Ferguson
I should've asked the question: (a) should gss_buffer_desc have uint32_t length or (b) should packet_get_string() use size_t? I think the latter is probably the more correct option. Just to fill in the picture further. gcc defines __SIZE_TYPE__ that size_t needs to be typedef'd to (otherwise yo

Re: [osol-code] size_t and gssapi.h

2008-11-13 Thread James Carlson
Darren J Moffat writes: > We don't compile ssh as a 64 bit binary for SPARC or x86 though. Why would this part fail if we did? The header itself is used in kernel code that's routinely compiled as 64-bit (so there should be nothing specifically wrong with the header file), and code that's consist

Re: [osol-code] size_t and gssapi.h

2008-11-13 Thread Darren J Moffat
James Carlson wrote: > Neale Ferguson writes: >> In gssapi.h the gss_buffer_desc structure looks like: >> >> typedef struct gss_buffer_desc_struct { >> size_t length; >> void *value; >> } gss_buffer_desc, *gss_buffer_t; >> >> In ssh/sshd/auth2-gss.c a call to packet_get_string() is

Re: [osol-code] size_t and gssapi.h

2008-11-13 Thread James Carlson
Neale Ferguson writes: > In gssapi.h the gss_buffer_desc structure looks like: > > typedef struct gss_buffer_desc_struct { > size_t length; > void *value; > } gss_buffer_desc, *gss_buffer_t; > > In ssh/sshd/auth2-gss.c a call to packet_get_string() is made using the > length fiel

[osol-code] size_t and gssapi.h

2008-11-13 Thread Neale Ferguson
In gssapi.h the gss_buffer_desc structure looks like: typedef struct gss_buffer_desc_struct { size_t length; void *value; } gss_buffer_desc, *gss_buffer_t; In ssh/sshd/auth2-gss.c a call to packet_get_string() is made using the length field of this structure. This requires a uint