NTSTATUS ndr_push_security_ace(struct ndr_push *ndr, int ndr_flags, const struct security_ace *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_security_ace_type(ndr, NDR_SCALARS, r->type)); NDR_CHECK(ndr_push_security_ace_flags(ndr, NDR_SCALARS, r->flags)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_size_security_ace(r,ndr->flags))); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->access_mask)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->object, r->type)); NDR_CHECK(ndr_push_security_ace_object_ctr(ndr, NDR_SCALARS, &r->object)); NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->trustee)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_security_ace_object_ctr(ndr, NDR_BUFFERS, &r->object)); } return NT_STATUS_OK; }
_PUBLIC_ enum ndr_err_code ndr_push_security_ace(struct ndr_push *ndr, int ndr_flags, const struct security_ace *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_security_ace_type(ndr, NDR_SCALARS, r->type)); NDR_CHECK(ndr_push_security_ace_flags(ndr, NDR_SCALARS, r->flags)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_size_security_ace(r, ndr->iconv_convenience, ndr->flags))); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->access_mask)); NDR_CHECK(ndr_push_set_switch_value(ndr, &r->object, r->type)); NDR_CHECK(ndr_push_security_ace_object_ctr(ndr, NDR_SCALARS, &r->object)); NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->trustee)); NDR_CHECK(ndr_push_trailer_align(ndr, 4)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_security_ace_object_ctr(ndr, NDR_BUFFERS, &r->object)); } return NDR_ERR_SUCCESS; }