diff options
Diffstat (limited to 'source4/librpc/ndr/ndr_sec.c')
-rw-r--r-- | source4/librpc/ndr/ndr_sec.c | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/source4/librpc/ndr/ndr_sec.c b/source4/librpc/ndr/ndr_sec.c index 5e4afe31a5e..06abbd355e6 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); - } -} |