diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-03-26 15:28:18 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-03-26 15:28:18 +0100 |
commit | 30a3dec549dc408940710409c80276077b4d9701 (patch) | |
tree | b0c0106ccbb9874875100ae5e18ec301e5c9f777 /source3/registry | |
parent | c42fc5e103d9d210c2f370e237a952e6df361792 (diff) | |
parent | 853f9283fb8fbcd2078e3cf8e99d6c8e24d77346 (diff) | |
download | samba-30a3dec549dc408940710409c80276077b4d9701.tar.gz samba-30a3dec549dc408940710409c80276077b4d9701.tar.bz2 samba-30a3dec549dc408940710409c80276077b4d9701.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/samba into displaysec
Diffstat (limited to 'source3/registry')
-rw-r--r-- | source3/registry/regfio.c | 26 |
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 ); |