summaryrefslogtreecommitdiff
path: root/source3/librpc/ndr/sid.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-01-24 13:53:36 +0100
committerGünther Deschner <gd@samba.org>2008-01-24 13:54:45 +0100
commitdf5b03a7802f1fedb2fd91f75f3545459be9f0e0 (patch)
tree5d0faf71720bf77f91039eab3525aac460bcb695 /source3/librpc/ndr/sid.c
parentb00529585d0a1d364be766e16779e5ff4ae5c43d (diff)
downloadsamba-df5b03a7802f1fedb2fd91f75f3545459be9f0e0.tar.gz
samba-df5b03a7802f1fedb2fd91f75f3545459be9f0e0.tar.bz2
samba-df5b03a7802f1fedb2fd91f75f3545459be9f0e0.zip
Re-run make idl and use generated ndr based on samba4 security.idl (except for DOM_SID).
Guenther (This used to be commit 1781a57b18f681f1bc03873330147a813f10eba2)
Diffstat (limited to 'source3/librpc/ndr/sid.c')
-rw-r--r--source3/librpc/ndr/sid.c67
1 files changed, 0 insertions, 67 deletions
diff --git a/source3/librpc/ndr/sid.c b/source3/librpc/ndr/sid.c
index 89ab2b8ea5..b6ec045806 100644
--- a/source3/librpc/ndr/sid.c
+++ b/source3/librpc/ndr/sid.c
@@ -187,70 +187,3 @@ enum ndr_err_code ndr_push_dom_sid28(struct ndr_push *ndr, int ndr_flags, const
return NDR_ERR_SUCCESS;
}
-
-enum ndr_err_code ndr_push_sec_desc_buf(struct ndr_push *ndr, int ndr_flags, const struct sec_desc_buf *r)
-{
- if (ndr_flags & NDR_SCALARS) {
- NDR_CHECK(ndr_push_align(ndr, 4));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_security_descriptor(r->sd,ndr->flags)));
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->sd));
- }
- if (ndr_flags & NDR_BUFFERS) {
- if (r->sd) {
- {
- struct ndr_push *_ndr_sd;
- NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_sd, 4, -1));
- NDR_CHECK(ndr_push_security_descriptor(_ndr_sd, NDR_SCALARS|NDR_BUFFERS, r->sd));
- NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_sd, 4, -1));
- }
- }
- }
- return NDR_ERR_SUCCESS;
-}
-
-enum ndr_err_code ndr_pull_sec_desc_buf(struct ndr_pull *ndr, int ndr_flags, struct sec_desc_buf *r)
-{
- uint32_t _ptr_sd;
- TALLOC_CTX *_mem_save_sd_0;
- if (ndr_flags & NDR_SCALARS) {
- NDR_CHECK(ndr_pull_align(ndr, 4));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sd_size));
- if (r->sd_size > 0x40000) { /* sd_size is unsigned */
- return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
- }
- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sd));
- if (_ptr_sd) {
- NDR_PULL_ALLOC(ndr, r->sd);
- } else {
- r->sd = NULL;
- }
- }
- if (ndr_flags & NDR_BUFFERS) {
- if (r->sd) {
- _mem_save_sd_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->sd, 0);
- {
- struct ndr_pull *_ndr_sd;
- NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_sd, 4, -1));
- NDR_CHECK(ndr_pull_security_descriptor(_ndr_sd, NDR_SCALARS|NDR_BUFFERS, r->sd));
- NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_sd, 4, -1));
- }
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sd_0, 0);
- }
- }
- return NDR_ERR_SUCCESS;
-}
-
-void ndr_print_sec_desc_buf(struct ndr_print *ndr, const char *name, const struct sec_desc_buf *r)
-{
- ndr_print_struct(ndr, name, "sec_desc_buf");
- ndr->depth++;
- ndr_print_uint32(ndr, "sd_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_security_descriptor(r->sd,ndr->flags):r->sd_size);
- ndr_print_ptr(ndr, "sd", r->sd);
- ndr->depth++;
- if (r->sd) {
- ndr_print_security_descriptor(ndr, "sd", r->sd);
- }
- ndr->depth--;
- ndr->depth--;
-}