summaryrefslogtreecommitdiff
path: root/source4/smbd/trans2.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-08-15 20:19:30 +0000
committerAndrew Tridgell <tridge@samba.org>2003-08-15 20:19:30 +0000
commit039e9dc5e609f32b959b6120976e2c59534c659f (patch)
tree79b95c4a4adfaa7e1f439740af3560c792808eaf /source4/smbd/trans2.c
parentdbe7b0c402f1d447c6eb4f7f35ad58d2fc2eae49 (diff)
downloadsamba-039e9dc5e609f32b959b6120976e2c59534c659f.tar.gz
samba-039e9dc5e609f32b959b6120976e2c59534c659f.tar.bz2
samba-039e9dc5e609f32b959b6120976e2c59534c659f.zip
- patch to fix a memory leak from metze
- fix a couple of unicode string errors for ascii clients found by RAW- tests (This used to be commit 81c941ba8ae33567d79b4bb0bb5928f5f6077b76)
Diffstat (limited to 'source4/smbd/trans2.c')
-rw-r--r--source4/smbd/trans2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/smbd/trans2.c b/source4/smbd/trans2.c
index b26dbd505a..0838fb04f4 100644
--- a/source4/smbd/trans2.c
+++ b/source4/smbd/trans2.c
@@ -136,7 +136,7 @@ static size_t trans2_push_data_string(struct request_context *req,
}
if (!(flags & (STR_ASCII|STR_UNICODE))) {
- flags |= (req->smb->negotiate.client_caps & CAP_UNICODE) ? STR_UNICODE : STR_ASCII;
+ flags |= (req->flags2 & FLAGS2_UNICODE_STRINGS) ? STR_UNICODE : STR_ASCII;
}
if ((offset&1) && (flags & STR_UNICODE) && !(flags & STR_NOALIGN)) {
@@ -555,21 +555,21 @@ static NTSTATUS trans2_fileinfo_fill(struct request_context *req, struct smb_tra
SSVAL(trans->out.data.data, 62, 0); /* padding */
SIVAL(trans->out.data.data, 64, st->all_info.out.ea_size);
trans2_append_data_string(req, trans, &st->all_info.out.fname,
- 68, 0);
+ 68, STR_UNICODE);
return NT_STATUS_OK;
case RAW_FILEINFO_NAME_INFO:
case RAW_FILEINFO_NAME_INFORMATION:
trans2_setup_reply(req, trans, 2, 4, 0);
SSVAL(trans->out.params.data, 0, 0);
- trans2_append_data_string(req, trans, &st->name_info.out.fname, 0, 0);
+ trans2_append_data_string(req, trans, &st->name_info.out.fname, 0, STR_UNICODE);
return NT_STATUS_OK;
case RAW_FILEINFO_ALT_NAME_INFO:
case RAW_FILEINFO_ALT_NAME_INFORMATION:
trans2_setup_reply(req, trans, 2, 4, 0);
SSVAL(trans->out.params.data, 0, 0);
- trans2_append_data_string(req, trans, &st->alt_name_info.out.fname, 0, 0);
+ trans2_append_data_string(req, trans, &st->alt_name_info.out.fname, 0, STR_UNICODE);
return NT_STATUS_OK;
case RAW_FILEINFO_STREAM_INFO: