summaryrefslogtreecommitdiff
path: root/source3/librpc/ndr/sid.c
diff options
context:
space:
mode:
authorKarolin Seeger <kseeger@samba.org>2008-02-29 10:44:38 +0100
committerKarolin Seeger <kseeger@samba.org>2008-02-29 10:44:38 +0100
commitc4fbe2846231a6b322c1094c6a1dbf93b7305768 (patch)
tree09eb77a294f4acda131b41fe4c9bec4ed175eb16 /source3/librpc/ndr/sid.c
parent1a6415fc77c708b87c8e2ce6e7828f486ffc87ac (diff)
parent695b6662abe64a40061bfa05ede12173fc4b1945 (diff)
downloadsamba-c4fbe2846231a6b322c1094c6a1dbf93b7305768.tar.gz
samba-c4fbe2846231a6b322c1094c6a1dbf93b7305768.tar.bz2
samba-c4fbe2846231a6b322c1094c6a1dbf93b7305768.zip
Merge commit 'origin/v3-2-test' into v3-2-stable
Conflicts: WHATSNEW.txt (This used to be commit a390bcf9403df4cf4d5eef42b35ebccbe253882e)
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--;
-}