summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-07-05 16:33:37 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:23:49 -0500
commitfcda5b589633b96415890c569bf23e3e284e0916 (patch)
tree0bed21f63dd1eaeabff953f157d9f6b556cf335b /source3/libsmb
parent5391750ce6db47678a03db4d67a016acff4fc8e2 (diff)
downloadsamba-fcda5b589633b96415890c569bf23e3e284e0916.tar.gz
samba-fcda5b589633b96415890c569bf23e3e284e0916.tar.bz2
samba-fcda5b589633b96415890c569bf23e3e284e0916.zip
r23726: Explicitly pass down the FLAGS2 field to srvstr_pull_buf. The next
checkin will pull this up to srvstr_get_path. At that point we can get more independent of the inbuf, the base_ptr in pull_string will only be used to satisfy UCS2 alignment constraints. (This used to be commit 836782b07bf133e9b2598c4a089f1c810e4c7754)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/clistr.c4
-rw-r--r--source3/libsmb/ntlmssp_parse.c21
-rw-r--r--source3/libsmb/smbencrypt.c3
3 files changed, 17 insertions, 11 deletions
diff --git a/source3/libsmb/clistr.c b/source3/libsmb/clistr.c
index 6191f99ea9..4d18434ff9 100644
--- a/source3/libsmb/clistr.c
+++ b/source3/libsmb/clistr.c
@@ -43,7 +43,9 @@ size_t clistr_pull_fn(const char *function, unsigned int line,
int dest_len, int src_len,
int flags)
{
- return pull_string_fn(function, line, cli->inbuf, dest, src, dest_len, src_len, flags);
+ return pull_string_fn(function, line, cli->inbuf,
+ SVAL(cli->inbuf, smb_flg2), dest, src, dest_len,
+ src_len, flags);
}
diff --git a/source3/libsmb/ntlmssp_parse.c b/source3/libsmb/ntlmssp_parse.c
index 3d96fa5f1a..a3977dbc01 100644
--- a/source3/libsmb/ntlmssp_parse.c
+++ b/source3/libsmb/ntlmssp_parse.c
@@ -220,9 +220,10 @@ BOOL msrpc_parse(const DATA_BLOB *blob,
return False;
if (0 < len1) {
- pull_string(NULL, p, blob->data + ptr, sizeof(p),
- len1,
- STR_UNICODE|STR_NOALIGN);
+ pull_string(
+ NULL, 0, p,
+ blob->data + ptr, sizeof(p),
+ len1, STR_UNICODE|STR_NOALIGN);
(*ps) = smb_xstrdup(p);
} else {
(*ps) = smb_xstrdup("");
@@ -248,9 +249,10 @@ BOOL msrpc_parse(const DATA_BLOB *blob,
return False;
if (0 < len1) {
- pull_string(NULL, p, blob->data + ptr, sizeof(p),
- len1,
- STR_ASCII|STR_NOALIGN);
+ pull_string(
+ NULL, 0, p,
+ blob->data + ptr, sizeof(p),
+ len1, STR_ASCII|STR_NOALIGN);
(*ps) = smb_xstrdup(p);
} else {
(*ps) = smb_xstrdup("");
@@ -300,9 +302,10 @@ BOOL msrpc_parse(const DATA_BLOB *blob,
if (blob->data + head_ofs < (uint8 *)head_ofs || blob->data + head_ofs < blob->data)
return False;
- head_ofs += pull_string(NULL, p, blob->data+head_ofs, sizeof(p),
- blob->length - head_ofs,
- STR_ASCII|STR_TERMINATE);
+ head_ofs += pull_string(
+ NULL, 0, p, blob->data+head_ofs, sizeof(p),
+ blob->length - head_ofs,
+ STR_ASCII|STR_TERMINATE);
if (strcmp(s, p) != 0) {
return False;
}
diff --git a/source3/libsmb/smbencrypt.c b/source3/libsmb/smbencrypt.c
index 2586128966..4e8c5066a8 100644
--- a/source3/libsmb/smbencrypt.c
+++ b/source3/libsmb/smbencrypt.c
@@ -555,7 +555,8 @@ BOOL decode_pw_buffer(uint8 in_buffer[516], char *new_pwrd,
}
/* decode into the return buffer. Buffer length supplied */
- *new_pw_len = pull_string(NULL, new_pwrd, &in_buffer[512 - byte_len], new_pwrd_size,
+ *new_pw_len = pull_string(NULL, 0, new_pwrd,
+ &in_buffer[512 - byte_len], new_pwrd_size,
byte_len, string_flags);
#ifdef DEBUG_PASSWORD