summaryrefslogtreecommitdiff
path: root/source3/smbd/process.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/process.c
parent769659eb0849fbc30a3284f99563dde965318bfd (diff)
downloadsamba-23e5cf060d282c9ba9bdf49884ce23a13b285aac.tar.gz
samba-23e5cf060d282c9ba9bdf49884ce23a13b285aac.tar.bz2
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/process.c')
-rw-r--r--source3/smbd/process.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index a34555adc1..dea7130cfe 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -897,7 +897,8 @@ void construct_reply_common(char *inbuf,char *outbuf)
CVAL(outbuf,smb_reh) = 0;
SCVAL(outbuf,smb_flg, FLAG_REPLY | (CVAL(inbuf,smb_flg) & FLAG_CASELESS_PATHNAMES)); /* bit 7 set
means a reply */
- SSVAL(outbuf,smb_flg2,FLAGS2_LONG_PATH_COMPONENTS);
+ SSVAL(outbuf,smb_flg2,
+ (SVAL(inbuf,smb_flg2)&FLAGS2_UNICODE_STRINGS) | FLAGS2_LONG_PATH_COMPONENTS);
/* say we support long filenames */
SSVAL(outbuf,smb_err,SMB_SUCCESS);
@@ -1188,9 +1189,6 @@ void smbd_process(void)
if ((InBuffer == NULL) || (OutBuffer == NULL))
return;
- InBuffer += SMB_ALIGNMENT;
- OutBuffer += SMB_ALIGNMENT;
-
max_recv = MIN(lp_maxxmit(),BUFFER_SIZE);
/* re-initialise the timezone */