summaryrefslogtreecommitdiffstats
path: root/source3/smbd/ipc.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-03-13 00:55:19 +0000
committerAndrew Tridgell <tridge@samba.org>2001-03-13 00:55:19 +0000
commit23e5cf060d282c9ba9bdf49884ce23a13b285aac (patch)
tree9f28af0029eff4813eb80af315b8ce7ab16f07ac /source3/smbd/ipc.c
parent769659eb0849fbc30a3284f99563dde965318bfd (diff)
downloadsamba-23e5cf060d282c9ba9bdf49884ce23a13b285aac.tar.gz
samba-23e5cf060d282c9ba9bdf49884ce23a13b285aac.tar.xz
samba-23e5cf060d282c9ba9bdf49884ce23a13b285aac.zip
this patch does a number of things:
- removes SMB_ALIGNMENT. That macro caused all sorts of problems with getting unicode aligned right in sub-protocols (such as SMBtrans and SMBtrans2). I believe the performance reasons for having SMB_ALIGNMENT has gone away with the new variants of the SMB protocol anyway, as newer commands tend to have their own internal alignment. - fix the locations where we set smb_flg2 to absolute values. We must never do this if we want a hope of coping with unicode. - add initial support for unicode on the wire in smbd. Currently enabled using SMBD_USE_UNICODE environment variable. (This used to be commit b98b1435e9d8f8622444c9ff33082977e661f16b)
Diffstat (limited to 'source3/smbd/ipc.c')
-rw-r--r--source3/smbd/ipc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/smbd/ipc.c b/source3/smbd/ipc.c
index 3b9e34b4d71..3cc9aca99e2 100644
--- a/source3/smbd/ipc.c
+++ b/source3/smbd/ipc.c
@@ -102,7 +102,7 @@ void send_trans_reply(char *outbuf,
if (buffer_too_large)
{
/* issue a buffer size warning. on a DCE/RPC pipe, expect an SMBreadX... */
- SIVAL(outbuf, smb_flg2, FLAGS2_32_BIT_ERROR_CODES);
+ SIVAL(outbuf, smb_flg2, SVAL(outbuf, smb_flg2) | FLAGS2_32_BIT_ERROR_CODES);
SIVAL(outbuf, smb_rcls, 0x80000000 | STATUS_BUFFER_OVERFLOW);
}
@@ -376,7 +376,7 @@ int reply_trans(connection_struct *conn, char *inbuf,char *outbuf, int size, int
START_PROFILE(SMBtrans);
memset(name, '\0',sizeof(name));
- fstrcpy(name,smb_buf(inbuf));
+ srvstr_pull(inbuf, name, smb_buf(inbuf), sizeof(name), -1, STR_TERMINATE|STR_CONVERT);
if (dscnt > tdscnt || pscnt > tpscnt) {
exit_server("invalid trans parameters\n");