summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-03-25 22:37:21 +0100
committerGünther Deschner <gd@samba.org>2009-03-25 22:50:40 +0100
commit8000479d181347bd6f248309168721fe3a20ad2a (patch)
tree5ca069fb98655cceb1cae9f685a0df2ed0949fe9 /source3
parent365b5cfcbeb041ce84718717f30ac02183c9af7f (diff)
downloadsamba-8000479d181347bd6f248309168721fe3a20ad2a.tar.gz
samba-8000479d181347bd6f248309168721fe3a20ad2a.tar.bz2
samba-8000479d181347bd6f248309168721fe3a20ad2a.zip
s3-registry: remove last sec_io_desc() caller.
This is a temporary solution while waiting for the regf merge from s4. Guenther
Diffstat (limited to 'source3')
-rw-r--r--source3/registry/regfio.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/source3/registry/regfio.c b/source3/registry/regfio.c
index d002bd72e7..e1c04c4777 100644
--- a/source3/registry/regfio.c
+++ b/source3/registry/regfio.c
@@ -712,8 +712,30 @@ static bool hbin_prs_sk_rec( const char *desc, REGF_HBIN *hbin, int depth, REGF_
if ( !prs_uint32( "size", ps, depth, &sk->size))
return False;
- if ( !sec_io_desc( "sec_desc", &sk->sec_desc, ps, depth ))
- return False;
+ {
+ NTSTATUS status;
+ TALLOC_CTX *mem_ctx = prs_get_mem_context(&hbin->ps);
+ DATA_BLOB blob;
+
+ if (MARSHALLING(&hbin->ps)) {
+ status = marshall_sec_desc(mem_ctx,
+ sk->sec_desc,
+ &blob.data, &blob.length);
+ if (!NT_STATUS_IS_OK(status))
+ return False;
+ if (!prs_copy_data_in(&hbin->ps, (const char *)blob.data, blob.length))
+ return False;
+ } else {
+ blob = data_blob_const(prs_data_p(&hbin->ps),
+ prs_data_size(&hbin->ps));
+ status = unmarshall_sec_desc(mem_ctx,
+ blob.data, blob.length,
+ &sk->sec_desc);
+ if (!NT_STATUS_IS_OK(status))
+ return False;
+ prs_set_offset(&hbin->ps, blob.length);
+ }
+ }
end_off = prs_offset( &hbin->ps );