diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-09-03 17:17:30 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:36:28 -0500 |
commit | 02b3abec25ed0b303906c5dae9dd527171762d9a (patch) | |
tree | 04bc902d7b1557e4038d34ccbced7e7ffab8109b /source4/rpc_server/winreg | |
parent | 0eea337a6f11c3a86414fbd31b065fc59a481435 (diff) | |
download | samba-02b3abec25ed0b303906c5dae9dd527171762d9a.tar.gz samba-02b3abec25ed0b303906c5dae9dd527171762d9a.tar.bz2 samba-02b3abec25ed0b303906c5dae9dd527171762d9a.zip |
r10007: Merge data_blk and data_len member of registry_value into a DATA_BLOB.
Fix handling of REG_DWORD in the LDB backend.
Fix a couple of warnings
(This used to be commit 709fdc7ebf5a77cfb50359fad978884777decc3b)
Diffstat (limited to 'source4/rpc_server/winreg')
-rw-r--r-- | source4/rpc_server/winreg/rpc_winreg.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/source4/rpc_server/winreg/rpc_winreg.c b/source4/rpc_server/winreg/rpc_winreg.c index f03ca2fa86..ba11b07148 100644 --- a/source4/rpc_server/winreg/rpc_winreg.c +++ b/source4/rpc_server/winreg/rpc_winreg.c @@ -225,7 +225,7 @@ static WERROR winreg_EnumValue(struct dcesrv_call_state *dce_call, TALLOC_CTX *m /* check the client has enough room for the value */ if (r->in.value != NULL && r->in.size != NULL && - value->data_len > *r->in.size) { + value->data.length > *r->in.size) { return WERR_MORE_DATA; } @@ -239,12 +239,12 @@ static WERROR winreg_EnumValue(struct dcesrv_call_state *dce_call, TALLOC_CTX *m r->out.name->size = 2*strlen_m_term(value->name); if (r->in.value) { - r->out.value = value->data_blk; + r->out.value = value->data.data; } if (r->in.size) { r->out.size = talloc(mem_ctx, uint32_t); - *r->out.size = value->data_len; + *r->out.size = value->data.length; r->out.length = r->out.size; } @@ -398,13 +398,13 @@ static WERROR winreg_QueryValue(struct dcesrv_call_state *dce_call, TALLOC_CTX * /* Just asking for the size of the buffer */ r->out.type = &val->data_type; - r->out.length = &val->data_len; + r->out.length = &val->data.length; if (!r->in.data) { r->out.size = talloc(mem_ctx, uint32_t); - *r->out.size = val->data_len; + *r->out.size = val->data.length; } else { r->out.size = r->in.size; - r->out.data = val->data_blk; + r->out.data = val->data.data; } return WERR_OK; @@ -460,12 +460,15 @@ static WERROR winreg_SetValue(struct dcesrv_call_state *dce_call, TALLOC_CTX *me struct dcesrv_handle *h; struct registry_key *key; WERROR result; + DATA_BLOB data; DCESRV_PULL_HANDLE_FAULT(h, r->in.handle, HTYPE_REGKEY); key = h->data; - result = reg_val_set(key, r->in.name.name, r->in.type, r->in.data, r->in.size); + data.data = r->in.data; + data.length = r->in.size; + result = reg_val_set(key, r->in.name.name, r->in.type, data); if (!W_ERROR_IS_OK(result)) { return result; |