summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-03-10 11:47:03 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:56:54 -0500
commit2d7353dea47f849ce6f18ecb6f896676f0a167df (patch)
treed509874057c8e8a06e2f868c0b49101a4ecad712 /source4
parente6023d44bc3290e05dfd155b083569676cf969ab (diff)
downloadsamba-2d7353dea47f849ce6f18ecb6f896676f0a167df.tar.gz
samba-2d7353dea47f849ce6f18ecb6f896676f0a167df.tar.bz2
samba-2d7353dea47f849ce6f18ecb6f896676f0a167df.zip
r14141: fixed bugzilla 2921, forcing correct alignment when in ascii mode
(This used to be commit f432d23b044355ae5214812e3794ab319b01268f)
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/raw/rawfile.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/libcli/raw/rawfile.c b/source4/libcli/raw/rawfile.c
index 0cc7385cee..2eacd1d22e 100644
--- a/source4/libcli/raw/rawfile.c
+++ b/source4/libcli/raw/rawfile.c
@@ -297,7 +297,7 @@ static struct smbcli_request *smb_raw_nttrans_create_send(struct smbcli_tree *tr
parms->ntcreatex.in.ea_list->eas);
}
- nt.in.params = data_blob_talloc(mem_ctx, NULL, 54);
+ nt.in.params = data_blob_talloc(mem_ctx, NULL, 53);
if (nt.in.params.data == NULL) {
talloc_free(mem_ctx);
return NULL;
@@ -319,7 +319,9 @@ static struct smbcli_request *smb_raw_nttrans_create_send(struct smbcli_tree *tr
SIVAL(params, 48, parms->ntcreatex.in.impersonation);
SCVAL(params, 52, parms->ntcreatex.in.security_flags);
SCVAL(params, 53, 0);
-
+
+ /* the empty string first forces the correct alignment */
+ smbcli_blob_append_string(tree->session, mem_ctx, &nt.in.params,"", 0);
fname_len = smbcli_blob_append_string(tree->session, mem_ctx, &nt.in.params,
parms->ntcreatex.in.fname, STR_TERMINATE);