summaryrefslogtreecommitdiff
path: root/source4/librpc/ndr/ndr.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-15 04:42:48 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-15 04:42:48 +0000
commit099899a7cc01fab5faba82e59650aa76bac8143e (patch)
tree581b349e1562b198be22c46e3f6c2e1238a86e10 /source4/librpc/ndr/ndr.c
parent5a1779b982569201decc8a09765d5361212813d7 (diff)
downloadsamba-099899a7cc01fab5faba82e59650aa76bac8143e.tar.gz
samba-099899a7cc01fab5faba82e59650aa76bac8143e.tar.bz2
samba-099899a7cc01fab5faba82e59650aa76bac8143e.zip
added lsa_QuerySecObj() and the necessary sec_desc_buf supporting code
also adding printing of security descriptors (This used to be commit 1f93cbc1d597b973ab1a5005ede093c1bcefff87)
Diffstat (limited to 'source4/librpc/ndr/ndr.c')
-rw-r--r--source4/librpc/ndr/ndr.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source4/librpc/ndr/ndr.c b/source4/librpc/ndr/ndr.c
index 3c2ed6e55b..5add5112e7 100644
--- a/source4/librpc/ndr/ndr.c
+++ b/source4/librpc/ndr/ndr.c
@@ -50,6 +50,20 @@ struct ndr_pull *ndr_pull_init_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx)
return ndr;
}
+/*
+ create an ndr sub-context based on an existing context. The new context starts
+ at the current offset, with the given size limit
+*/
+NTSTATUS ndr_pull_subcontext(struct ndr_pull *ndr, struct ndr_pull *ndr2, uint32 size)
+{
+ NDR_PULL_NEED_BYTES(ndr, size);
+ *ndr2 = *ndr;
+ ndr2->data += ndr2->offset;
+ ndr2->offset = 0;
+ ndr2->data_size = size;
+ return NT_STATUS_OK;
+}
+
/* limit the remaining size of the current ndr parse structure to the
given size, starting at the given offset