summaryrefslogtreecommitdiff
path: root/source4/smb_server/trans2.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-09-21 08:46:47 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:58:56 -0500
commit23ba434b017d61f397befe9808fa3214c3964355 (patch)
tree6b44688395804faba93febbcd0411c221481b98f /source4/smb_server/trans2.c
parentd9e43bc8834d797a2f5a7d39342f4083a3bc8239 (diff)
downloadsamba-23ba434b017d61f397befe9808fa3214c3964355.tar.gz
samba-23ba434b017d61f397befe9808fa3214c3964355.tar.bz2
samba-23ba434b017d61f397befe9808fa3214c3964355.zip
r2469: complete overhaul of the old-style RAW_SEARCH_ calls (the OS/2 and
original core level calls). The old code was completely wrong in many respects. also fixed the EA_SIZE level in the server extended the RAW-SEARCH test suite to test the new code properly (This used to be commit 71480271ad84b57fcdde264a54bb2408cf783255)
Diffstat (limited to 'source4/smb_server/trans2.c')
-rw-r--r--source4/smb_server/trans2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/smb_server/trans2.c b/source4/smb_server/trans2.c
index 57a385fe27..6e02ddc90d 100644
--- a/source4/smb_server/trans2.c
+++ b/source4/smb_server/trans2.c
@@ -885,6 +885,8 @@ static void find_fill_info(struct smbsrv_request *req,
switch (state->level) {
case RAW_SEARCH_SEARCH:
+ case RAW_SEARCH_FFIRST:
+ case RAW_SEARCH_FUNIQUE:
case RAW_SEARCH_GENERIC:
/* handled elsewhere */
break;
@@ -926,6 +928,8 @@ static void find_fill_info(struct smbsrv_request *req,
SIVAL(data, 22, file->ea_size.ea_size);
trans2_append_data_string(req, trans, &file->ea_size.name,
ofs + 26, STR_LEN8BIT | STR_NOALIGN);
+ trans2_grow_data(req, trans, trans->out.data.length + 1);
+ trans->out.data.data[trans->out.data.length-1] = 0;
break;
case RAW_SEARCH_DIRECTORY_INFO: