1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-02 00:22:11 +03:00

s3:mdssvc: supposed status field is in fact a fragment indicator

Spotted this in mdssvc response that containied many results for a search
request: if the mdssvc response blob is larger then ~32k, the server fragments
the response in 32k fragments and sets the "fragment" field to 1.

Note that mdssvc implemenets result set "fragmentation" at the result set layer,
not at the marshalled response buffer layer. Therefor mdssvc always sets this
field to 0.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Ralph Boehme
2019-04-16 14:04:16 +02:00
committed by Jeremy Allison
parent c742ab7a4c
commit 0b1d9d40c2
2 changed files with 4 additions and 3 deletions

View File

@ -51,7 +51,7 @@ interface mdssvc
[in] uint32 max_fragment_size2,
[in] uint32 unkn7, /* always 0 ? */
[in] uint32 unkn8, /* always 0 ? */
[out,ref] uint32 *status,
[out,ref] uint32 *fragment,
[out,ref] mdssvc_blob *response_blob,
[out,ref] uint32 *unkn9 /* always 0 ? */
);

View File

@ -264,13 +264,14 @@ void _mdssvc_cmd(struct pipes_struct *p, struct mdssvc_cmd *r)
r->out.response_blob->spotlight_blob = (uint8_t *)rbuf;
r->out.response_blob->size = r->in.max_fragment_size1;
/* We currently don't use fragmentation at the mdssvc RPC layer */
*r->out.fragment = 0;
ok = mds_dispatch(mds_ctx, &r->in.request_blob, r->out.response_blob);
if (ok) {
*r->out.status = 0;
*r->out.unkn9 = 0;
} else {
/* FIXME: just interpolating from AFP, needs verification */
*r->out.status = UINT32_MAX;
*r->out.unkn9 = UINT32_MAX;
}