mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
s4-winreg: fix dcesrv_winreg_EnumValue behavior
When returning WERR_MORE_DATA the winreg server needs to indicate the required buffer size. Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Mon Nov 20 04:50:00 UTC 2023 on atb-devel-224
This commit is contained in:
parent
1fd0689f0e
commit
5119d5540d
@ -1 +0,0 @@
|
||||
^samba4.rpc.winreg.*
|
@ -312,6 +312,10 @@ static WERROR dcesrv_winreg_EnumValue(struct dcesrv_call_state *dce_call,
|
||||
}
|
||||
*r->out.type = (enum winreg_Type) data_type;
|
||||
|
||||
if (r->in.size != NULL) {
|
||||
r->out.size = talloc(mem_ctx, uint32_t);
|
||||
*r->out.size = data.length;
|
||||
}
|
||||
/* check the client has enough room for the value */
|
||||
if (r->in.value != NULL &&
|
||||
r->in.size != NULL &&
|
||||
@ -323,9 +327,7 @@ static WERROR dcesrv_winreg_EnumValue(struct dcesrv_call_state *dce_call,
|
||||
r->out.value = data.data;
|
||||
}
|
||||
|
||||
if (r->in.size != NULL) {
|
||||
r->out.size = talloc(mem_ctx, uint32_t);
|
||||
*r->out.size = data.length;
|
||||
if (r->in.length != NULL) {
|
||||
r->out.length = r->out.size;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user