Kerberos Ticket Forwarding Patch/Update (3.2)
Jeremy Allison
jra at samba.org
Fri Aug 1 00:44:43 GMT 2008
On Fri, Jul 25, 2008 at 03:14:56PM -0400, Derrick Schommer wrote:
> Here is the update with C-style comment fixes for 3.2 for the Kerberos
> update and the gss_init() updated to have the C_DELEGAT flag enabled.
Ok, just looked this over and you can't use a struct
to create a memory block like that. There's no guarentee
of correct packing by the compiler and also as Love
pointed out this needs to be explicitly LE.
Take a look at the code in smbd/nttrans.c around line 384
for an example of how we manually do this for SMB/CIFS.
eg.
384 p = (char *)req->outbuf + smb_vwv2;
385 p++;
386 SSVAL(p,0,pnum);
387 p += 2;
388 SIVAL(p,0,FILE_WAS_OPENED);
389 p += 4;
390 p += 32;
391 SIVAL(p,0,FILE_ATTRIBUTE_NORMAL); /* File Attributes. */
392 p += 20;
393 /* File type. */
394 SSVAL(p,0,FILE_TYPE_MESSAGE_MODE_PIPE);
395 /* Device state. */
396 SSVAL(p,2, 0x5FF); /* ? */
397 p += 4;
Cheers,
Jeremy.
More information about the samba-technical
mailing list