summaryrefslogtreecommitdiff
path: root/source4/smb_server/smb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-02-14 12:30:31 +1100
committerAndrew Tridgell <tridge@samba.org>2008-02-14 12:30:31 +1100
commit839ab724dc2d204bfbb0693aeed64f6f83a4266b (patch)
treeec1db35884c7601a58a7cbeaddb94c75fd6668ec /source4/smb_server/smb
parente870cfec9f3512b0f1bd3110d7b975652525e28a (diff)
downloadsamba-839ab724dc2d204bfbb0693aeed64f6f83a4266b.tar.gz
samba-839ab724dc2d204bfbb0693aeed64f6f83a4266b.tar.bz2
samba-839ab724dc2d204bfbb0693aeed64f6f83a4266b.zip
Fixed SMB2 rename operations from Vista clients
We needed a flag in bufinfo to mark packets as SMB2, as it seems that SMB2 uses a different format for the RenameInformation buffer than SMB does Also handle the fact that SMB2 clients give the full path to the target file in the rename, not a relative path (This used to be commit 52d7972d95ddc19d22a4187b4d4428a6c3ed32d5)
Diffstat (limited to 'source4/smb_server/smb')
-rw-r--r--source4/smb_server/smb/request.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source4/smb_server/smb/request.c b/source4/smb_server/smb/request.c
index 724055499b..d7f3793f23 100644
--- a/source4/smb_server/smb/request.c
+++ b/source4/smb_server/smb/request.c
@@ -37,7 +37,10 @@
void smbsrv_setup_bufinfo(struct smbsrv_request *req)
{
req->in.bufinfo.mem_ctx = req;
- req->in.bufinfo.unicode = (req->flags2 & FLAGS2_UNICODE_STRINGS)?true:false;
+ req->in.bufinfo.flags = 0;
+ if (req->flags2 & FLAGS2_UNICODE_STRINGS) {
+ req->in.bufinfo.flags |= BUFINFO_FLAG_UNICODE;
+ }
req->in.bufinfo.align_base = req->in.buffer;
req->in.bufinfo.data = req->in.data;
req->in.bufinfo.data_size = req->in.data_size;
@@ -582,7 +585,7 @@ static size_t req_pull_ascii(struct request_bufinfo *bufinfo, const char **dest,
size_t req_pull_string(struct request_bufinfo *bufinfo, const char **dest, const uint8_t *src, int byte_len, uint_t flags)
{
if (!(flags & STR_ASCII) &&
- (((flags & STR_UNICODE) || bufinfo->unicode))) {
+ (((flags & STR_UNICODE) || (bufinfo->flags & BUFINFO_FLAG_UNICODE)))) {
return req_pull_ucs2(bufinfo, dest, src, byte_len, flags);
}