summaryrefslogtreecommitdiff
path: root/source4/libcli/raw/rawrequest.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-11-22 13:12:22 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:46:37 -0500
commite8f17538a71b67a435882989325eb66dae8bc426 (patch)
tree81717bff75adae6622479a2a295b27ef108b4e05 /source4/libcli/raw/rawrequest.c
parentf3dc80e2efff624eff302f5b53de1bc4d7e6ceaf (diff)
downloadsamba-e8f17538a71b67a435882989325eb66dae8bc426.tar.gz
samba-e8f17538a71b67a435882989325eb66dae8bc426.tar.bz2
samba-e8f17538a71b67a435882989325eb66dae8bc426.zip
r11848: separate out the info levels common to SMB and SMB2 for raw_search
(This used to be commit ed8d3073472fbb0850209f81dd04bd94f6d1c33d)
Diffstat (limited to 'source4/libcli/raw/rawrequest.c')
-rw-r--r--source4/libcli/raw/rawrequest.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source4/libcli/raw/rawrequest.c b/source4/libcli/raw/rawrequest.c
index 6e02ddc5c1..cd76e0e438 100644
--- a/source4/libcli/raw/rawrequest.c
+++ b/source4/libcli/raw/rawrequest.c
@@ -849,6 +849,13 @@ size_t smbcli_blob_pull_string(struct smbcli_session *session,
{
int extra;
dest->s = NULL;
+
+ /* this is here to cope with SMB2 calls using the SMB
+ parsers. SMB2 will pass smbcli_session==NULL, which forces
+ unicode on (as used by SMB2) */
+ if (session == NULL && !(flags & STR_ASCII)) {
+ flags |= STR_UNICODE;
+ }
if (flags & STR_LEN8BIT) {
if (len_offset > blob->length-1) {