security:idl Generated files
[ira/wip.git] / librpc / gen_ndr / ndr_security.c
index c227170779ae5d95246022d581d01b177c76f610..0bc039d96771c11848eca5ba493369cd6b9eacb8 100644 (file)
@@ -850,6 +850,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_security_token(struct ndr_push *ndr, int ndr
                        NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids[cntr_sids_0]));
                }
                NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->privilege_mask));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->default_dacl));
        }
        if (ndr_flags & NDR_BUFFERS) {
                if (r->user_sid) {
@@ -863,6 +864,9 @@ _PUBLIC_ enum ndr_err_code ndr_push_security_token(struct ndr_push *ndr, int ndr
                                NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->sids[cntr_sids_0]));
                        }
                }
+               if (r->default_dacl) {
+                       NDR_CHECK(ndr_push_security_acl(ndr, NDR_SCALARS|NDR_BUFFERS, r->default_dacl));
+               }
        }
        return NDR_ERR_SUCCESS;
 }
@@ -877,6 +881,8 @@ _PUBLIC_ enum ndr_err_code ndr_pull_security_token(struct ndr_pull *ndr, int ndr
        uint32_t cntr_sids_0;
        TALLOC_CTX *_mem_save_sids_0;
        TALLOC_CTX *_mem_save_sids_1;
+       uint32_t _ptr_default_dacl;
+       TALLOC_CTX *_mem_save_default_dacl_0;
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_pull_align(ndr, 4));
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user_sid));
@@ -906,6 +912,12 @@ _PUBLIC_ enum ndr_err_code ndr_pull_security_token(struct ndr_pull *ndr, int ndr
                }
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
                NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->privilege_mask));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_default_dacl));
+               if (_ptr_default_dacl) {
+                       NDR_PULL_ALLOC(ndr, r->default_dacl);
+               } else {
+                       r->default_dacl = NULL;
+               }
                if (r->sids) {
                        NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->num_sids));
                }
@@ -934,6 +946,12 @@ _PUBLIC_ enum ndr_err_code ndr_pull_security_token(struct ndr_pull *ndr, int ndr
                        }
                }
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
+               if (r->default_dacl) {
+                       _mem_save_default_dacl_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->default_dacl, 0);
+                       NDR_CHECK(ndr_pull_security_acl(ndr, NDR_SCALARS|NDR_BUFFERS, r->default_dacl));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_default_dacl_0, 0);
+               }
        }
        return NDR_ERR_SUCCESS;
 }
@@ -972,6 +990,12 @@ _PUBLIC_ void ndr_print_security_token(struct ndr_print *ndr, const char *name,
        }
        ndr->depth--;
        ndr_print_udlong(ndr, "privilege_mask", r->privilege_mask);
+       ndr_print_ptr(ndr, "default_dacl", r->default_dacl);
+       ndr->depth++;
+       if (r->default_dacl) {
+               ndr_print_security_acl(ndr, "default_dacl", r->default_dacl);
+       }
+       ndr->depth--;
        ndr->depth--;
 }
 
@@ -1030,3 +1054,29 @@ _PUBLIC_ void ndr_print_kerb_EncTypes(struct ndr_print *ndr, const char *name, u
        ndr->depth--;
 }
 
+_PUBLIC_ enum ndr_err_code ndr_push_security_autoinherit(struct ndr_push *ndr, int ndr_flags, uint32_t r)
+{
+       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_security_autoinherit(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
+{
+       uint32_t v;
+       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+       *r = v;
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_security_autoinherit(struct ndr_print *ndr, const char *name, uint32_t r)
+{
+       ndr_print_uint32(ndr, name, r);
+       ndr->depth++;
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SEC_DACL_AUTO_INHERIT", SEC_DACL_AUTO_INHERIT, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SEC_SACL_AUTO_INHERIT", SEC_SACL_AUTO_INHERIT, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SEC_DEFAULT_DESCRIPTOR", SEC_DEFAULT_DESCRIPTOR, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SEC_OWNER_FROM_PARENT", SEC_OWNER_FROM_PARENT, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SEC_GROUP_FROM_PARENT", SEC_GROUP_FROM_PARENT, r);
+       ndr->depth--;
+}
+