summaryrefslogtreecommitdiff
path: root/source4/librpc/ndr/ndr_sec.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-16 06:00:15 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-16 06:00:15 +0000
commit7b40bd0a5f7adbca91ce42ae36bb4908a4515fa8 (patch)
tree210387df2fabb2fedc71aea27472bf3c7cd5e642 /source4/librpc/ndr/ndr_sec.c
parent3d7524c7ae03f2f257c64a8b1f681b798055fff7 (diff)
downloadsamba-7b40bd0a5f7adbca91ce42ae36bb4908a4515fa8.tar.gz
samba-7b40bd0a5f7adbca91ce42ae36bb4908a4515fa8.tar.bz2
samba-7b40bd0a5f7adbca91ce42ae36bb4908a4515fa8.zip
use the "subcontext" magic flag for sec_desc_buf
(This used to be commit 05ed2f6dc986111ce448123c91380f9340799ecc)
Diffstat (limited to 'source4/librpc/ndr/ndr_sec.c')
-rw-r--r--source4/librpc/ndr/ndr_sec.c49
1 files changed, 0 insertions, 49 deletions
diff --git a/source4/librpc/ndr/ndr_sec.c b/source4/librpc/ndr/ndr_sec.c
index 5e4afe31a5..06abbd355e 100644
--- a/source4/librpc/ndr/ndr_sec.c
+++ b/source4/librpc/ndr/ndr_sec.c
@@ -424,52 +424,3 @@ void ndr_print_security_descriptor(struct ndr_print *ndr,
ndr->depth--;
}
-
-
-/*
- implementation of sec_desc_buf - an encapsulated security descriptor
-*/
-NTSTATUS ndr_pull_sec_desc_buf(struct ndr_pull *ndr, int ndr_flags,
- struct sec_desc_buf *sdbuf)
-{
- if (ndr_flags & NDR_SCALARS) {
- uint32 _ptr;
- NDR_CHECK(ndr_pull_uint32(ndr, &sdbuf->size));
- NDR_CHECK(ndr_pull_uint32(ndr, &_ptr));
- if (_ptr) {
- NDR_ALLOC(ndr, sdbuf->sd);
- } else {
- sdbuf->sd = NULL;
- }
- }
- if (ndr_flags & NDR_BUFFERS) {
- if (sdbuf->sd) {
- struct ndr_pull ndr2;
- uint32 size;
- NDR_CHECK(ndr_pull_uint32(ndr, &size));
- if (size != sdbuf->size) {
- return NT_STATUS_INFO_LENGTH_MISMATCH;
- }
- NDR_CHECK(ndr_pull_subcontext(ndr, &ndr2, sdbuf->size));
- NDR_CHECK(ndr_pull_security_descriptor(&ndr2, sdbuf->sd));
- NDR_CHECK(ndr_pull_advance(ndr, sdbuf->size));
- }
- }
- return NT_STATUS_OK;
-}
-
-
-/*
- print a sec_desc_buf
-*/
-void ndr_print_sec_desc_buf(struct ndr_print *ndr, const char *name,
- struct sec_desc_buf *sdbuf)
-{
- ndr_print_struct(ndr, name, "sec_desc_buf");
- ndr->depth++;
- ndr_print_uint32(ndr, "size", sdbuf->size);
- ndr_print_ptr(ndr, "sd", sdbuf->sd);
- if (sdbuf->sd) {
- ndr_print_security_descriptor(ndr, "sd", sdbuf->sd);
- }
-}