s3: libsmb: Correctly align create contexts in a create call.
authorJeremy Allison <jra@samba.org>
Fri, 19 Aug 2016 23:58:39 +0000 (16:58 -0700)
committerJeremy Allison <jra@samba.org>
Mon, 22 Aug 2016 17:10:22 +0000 (19:10 +0200)
SMB2 shadow copy requests are the first time we've used
create contexts in anger in this codepath. This took me
longer than I'd like to admit to find :-).

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12166

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
libcli/smb/smb2cli_create.c

index 0db546c541464645fa399a056186f588f908075a..778b501fae72028c24752184b838059bd4a60322 100644 (file)
@@ -113,6 +113,7 @@ struct tevent_req *smb2cli_create_send(
        blobs_offset = ((blobs_offset + 3) & ~3);
 
        if (blob.length > 0) {
+               blobs_offset = ((blobs_offset + 7) & ~7);
                SIVAL(fixed, 48, blobs_offset + SMB2_HDR_BODY + 56);
                SIVAL(fixed, 52, blob.length);
        }