Kerberos Ticket Forwarding Patch/Update (3.2)
Derrick Schommer
d.schommer at f5.com
Fri Aug 1 01:18:10 GMT 2008
Okay, I¹ll see what I can do. As it is, it works, so if I implement it and
it breaks I know I¹m doing it wrong :) I wrote an internal CIFS client for
scale testing, I know the ³fun² behind SMB and padding. I was just turning
off auto alignment with compiler directives on my structures to get around
the non-byte aligned protocol.
I¹ll give this a go, hopefully tomorrow morning after some coffee.
Derrick
On 7/31/08 8:44 PM, "Jeremy Allison" <jra at samba.org> wrote:
> 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