summaryrefslogtreecommitdiff
path: root/source3/autoconf/librpc/gen_ndr/srv_drsblobs.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/autoconf/librpc/gen_ndr/srv_drsblobs.c')
-rw-r--r--source3/autoconf/librpc/gen_ndr/srv_drsblobs.c1140
1 files changed, 1140 insertions, 0 deletions
diff --git a/source3/autoconf/librpc/gen_ndr/srv_drsblobs.c b/source3/autoconf/librpc/gen_ndr/srv_drsblobs.c
new file mode 100644
index 0000000000..f1aea182b9
--- /dev/null
+++ b/source3/autoconf/librpc/gen_ndr/srv_drsblobs.c
@@ -0,0 +1,1140 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * server auto-generated by pidl. DO NOT MODIFY!
+ */
+
+#include "includes.h"
+#include "ntdomain.h"
+#include "autoconf/librpc/gen_ndr/srv_drsblobs.h"
+
+static bool api_decode_replPropertyMetaData(struct pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ struct decode_replPropertyMetaData *r;
+
+ call = &ndr_table_drsblobs.calls[NDR_DECODE_REPLPROPERTYMETADATA];
+
+ r = talloc(talloc_tos(), struct decode_replPropertyMetaData);
+ if (r == NULL) {
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&p->in_data.data, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ if (p->endian) {
+ pull->flags |= LIBNDR_FLAG_BIGENDIAN;
+ }
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_FUNCTION_DEBUG(decode_replPropertyMetaData, NDR_IN, r);
+ }
+
+ _decode_replPropertyMetaData(p, r);
+
+ if (p->fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_FUNCTION_DEBUG(decode_replPropertyMetaData, NDR_OUT | NDR_SET_VALUES, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ /*
+ * carry over the pointer count to the reply in case we are
+ * using full pointer. See NDR specification for full pointers
+ */
+ push->ptr_count = pull->ptr_count;
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ p->out_data.rdata = ndr_push_blob(push);
+ talloc_steal(p->mem_ctx, p->out_data.rdata.data);
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_decode_replUpToDateVector(struct pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ struct decode_replUpToDateVector *r;
+
+ call = &ndr_table_drsblobs.calls[NDR_DECODE_REPLUPTODATEVECTOR];
+
+ r = talloc(talloc_tos(), struct decode_replUpToDateVector);
+ if (r == NULL) {
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&p->in_data.data, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ if (p->endian) {
+ pull->flags |= LIBNDR_FLAG_BIGENDIAN;
+ }
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_FUNCTION_DEBUG(decode_replUpToDateVector, NDR_IN, r);
+ }
+
+ _decode_replUpToDateVector(p, r);
+
+ if (p->fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_FUNCTION_DEBUG(decode_replUpToDateVector, NDR_OUT | NDR_SET_VALUES, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ /*
+ * carry over the pointer count to the reply in case we are
+ * using full pointer. See NDR specification for full pointers
+ */
+ push->ptr_count = pull->ptr_count;
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ p->out_data.rdata = ndr_push_blob(push);
+ talloc_steal(p->mem_ctx, p->out_data.rdata.data);
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_decode_repsFromTo(struct pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ struct decode_repsFromTo *r;
+
+ call = &ndr_table_drsblobs.calls[NDR_DECODE_REPSFROMTO];
+
+ r = talloc(talloc_tos(), struct decode_repsFromTo);
+ if (r == NULL) {
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&p->in_data.data, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ if (p->endian) {
+ pull->flags |= LIBNDR_FLAG_BIGENDIAN;
+ }
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_FUNCTION_DEBUG(decode_repsFromTo, NDR_IN, r);
+ }
+
+ _decode_repsFromTo(p, r);
+
+ if (p->fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_FUNCTION_DEBUG(decode_repsFromTo, NDR_OUT | NDR_SET_VALUES, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ /*
+ * carry over the pointer count to the reply in case we are
+ * using full pointer. See NDR specification for full pointers
+ */
+ push->ptr_count = pull->ptr_count;
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ p->out_data.rdata = ndr_push_blob(push);
+ talloc_steal(p->mem_ctx, p->out_data.rdata.data);
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_decode_partialAttributeSet(struct pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ struct decode_partialAttributeSet *r;
+
+ call = &ndr_table_drsblobs.calls[NDR_DECODE_PARTIALATTRIBUTESET];
+
+ r = talloc(talloc_tos(), struct decode_partialAttributeSet);
+ if (r == NULL) {
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&p->in_data.data, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ if (p->endian) {
+ pull->flags |= LIBNDR_FLAG_BIGENDIAN;
+ }
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_FUNCTION_DEBUG(decode_partialAttributeSet, NDR_IN, r);
+ }
+
+ _decode_partialAttributeSet(p, r);
+
+ if (p->fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_FUNCTION_DEBUG(decode_partialAttributeSet, NDR_OUT | NDR_SET_VALUES, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ /*
+ * carry over the pointer count to the reply in case we are
+ * using full pointer. See NDR specification for full pointers
+ */
+ push->ptr_count = pull->ptr_count;
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ p->out_data.rdata = ndr_push_blob(push);
+ talloc_steal(p->mem_ctx, p->out_data.rdata.data);
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_decode_prefixMap(struct pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ struct decode_prefixMap *r;
+
+ call = &ndr_table_drsblobs.calls[NDR_DECODE_PREFIXMAP];
+
+ r = talloc(talloc_tos(), struct decode_prefixMap);
+ if (r == NULL) {
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&p->in_data.data, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ if (p->endian) {
+ pull->flags |= LIBNDR_FLAG_BIGENDIAN;
+ }
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_FUNCTION_DEBUG(decode_prefixMap, NDR_IN, r);
+ }
+
+ _decode_prefixMap(p, r);
+
+ if (p->fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_FUNCTION_DEBUG(decode_prefixMap, NDR_OUT | NDR_SET_VALUES, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ /*
+ * carry over the pointer count to the reply in case we are
+ * using full pointer. See NDR specification for full pointers
+ */
+ push->ptr_count = pull->ptr_count;
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ p->out_data.rdata = ndr_push_blob(push);
+ talloc_steal(p->mem_ctx, p->out_data.rdata.data);
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_decode_ldapControlDirSync(struct pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ struct decode_ldapControlDirSync *r;
+
+ call = &ndr_table_drsblobs.calls[NDR_DECODE_LDAPCONTROLDIRSYNC];
+
+ r = talloc(talloc_tos(), struct decode_ldapControlDirSync);
+ if (r == NULL) {
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&p->in_data.data, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ if (p->endian) {
+ pull->flags |= LIBNDR_FLAG_BIGENDIAN;
+ }
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_FUNCTION_DEBUG(decode_ldapControlDirSync, NDR_IN, r);
+ }
+
+ _decode_ldapControlDirSync(p, r);
+
+ if (p->fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_FUNCTION_DEBUG(decode_ldapControlDirSync, NDR_OUT | NDR_SET_VALUES, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ /*
+ * carry over the pointer count to the reply in case we are
+ * using full pointer. See NDR specification for full pointers
+ */
+ push->ptr_count = pull->ptr_count;
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ p->out_data.rdata = ndr_push_blob(push);
+ talloc_steal(p->mem_ctx, p->out_data.rdata.data);
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_decode_supplementalCredentials(struct pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ struct decode_supplementalCredentials *r;
+
+ call = &ndr_table_drsblobs.calls[NDR_DECODE_SUPPLEMENTALCREDENTIALS];
+
+ r = talloc(talloc_tos(), struct decode_supplementalCredentials);
+ if (r == NULL) {
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&p->in_data.data, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ if (p->endian) {
+ pull->flags |= LIBNDR_FLAG_BIGENDIAN;
+ }
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_FUNCTION_DEBUG(decode_supplementalCredentials, NDR_IN, r);
+ }
+
+ _decode_supplementalCredentials(p, r);
+
+ if (p->fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_FUNCTION_DEBUG(decode_supplementalCredentials, NDR_OUT | NDR_SET_VALUES, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ /*
+ * carry over the pointer count to the reply in case we are
+ * using full pointer. See NDR specification for full pointers
+ */
+ push->ptr_count = pull->ptr_count;
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ p->out_data.rdata = ndr_push_blob(push);
+ talloc_steal(p->mem_ctx, p->out_data.rdata.data);
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_decode_Packages(struct pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ struct decode_Packages *r;
+
+ call = &ndr_table_drsblobs.calls[NDR_DECODE_PACKAGES];
+
+ r = talloc(talloc_tos(), struct decode_Packages);
+ if (r == NULL) {
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&p->in_data.data, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ if (p->endian) {
+ pull->flags |= LIBNDR_FLAG_BIGENDIAN;
+ }
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_FUNCTION_DEBUG(decode_Packages, NDR_IN, r);
+ }
+
+ _decode_Packages(p, r);
+
+ if (p->fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_FUNCTION_DEBUG(decode_Packages, NDR_OUT | NDR_SET_VALUES, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ /*
+ * carry over the pointer count to the reply in case we are
+ * using full pointer. See NDR specification for full pointers
+ */
+ push->ptr_count = pull->ptr_count;
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ p->out_data.rdata = ndr_push_blob(push);
+ talloc_steal(p->mem_ctx, p->out_data.rdata.data);
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_decode_PrimaryKerberos(struct pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ struct decode_PrimaryKerberos *r;
+
+ call = &ndr_table_drsblobs.calls[NDR_DECODE_PRIMARYKERBEROS];
+
+ r = talloc(talloc_tos(), struct decode_PrimaryKerberos);
+ if (r == NULL) {
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&p->in_data.data, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ if (p->endian) {
+ pull->flags |= LIBNDR_FLAG_BIGENDIAN;
+ }
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_FUNCTION_DEBUG(decode_PrimaryKerberos, NDR_IN, r);
+ }
+
+ _decode_PrimaryKerberos(p, r);
+
+ if (p->fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_FUNCTION_DEBUG(decode_PrimaryKerberos, NDR_OUT | NDR_SET_VALUES, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ /*
+ * carry over the pointer count to the reply in case we are
+ * using full pointer. See NDR specification for full pointers
+ */
+ push->ptr_count = pull->ptr_count;
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ p->out_data.rdata = ndr_push_blob(push);
+ talloc_steal(p->mem_ctx, p->out_data.rdata.data);
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_decode_PrimaryCLEARTEXT(struct pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ struct decode_PrimaryCLEARTEXT *r;
+
+ call = &ndr_table_drsblobs.calls[NDR_DECODE_PRIMARYCLEARTEXT];
+
+ r = talloc(talloc_tos(), struct decode_PrimaryCLEARTEXT);
+ if (r == NULL) {
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&p->in_data.data, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ if (p->endian) {
+ pull->flags |= LIBNDR_FLAG_BIGENDIAN;
+ }
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_FUNCTION_DEBUG(decode_PrimaryCLEARTEXT, NDR_IN, r);
+ }
+
+ _decode_PrimaryCLEARTEXT(p, r);
+
+ if (p->fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_FUNCTION_DEBUG(decode_PrimaryCLEARTEXT, NDR_OUT | NDR_SET_VALUES, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ /*
+ * carry over the pointer count to the reply in case we are
+ * using full pointer. See NDR specification for full pointers
+ */
+ push->ptr_count = pull->ptr_count;
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ p->out_data.rdata = ndr_push_blob(push);
+ talloc_steal(p->mem_ctx, p->out_data.rdata.data);
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_decode_PrimaryWDigest(struct pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ struct decode_PrimaryWDigest *r;
+
+ call = &ndr_table_drsblobs.calls[NDR_DECODE_PRIMARYWDIGEST];
+
+ r = talloc(talloc_tos(), struct decode_PrimaryWDigest);
+ if (r == NULL) {
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&p->in_data.data, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ if (p->endian) {
+ pull->flags |= LIBNDR_FLAG_BIGENDIAN;
+ }
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_FUNCTION_DEBUG(decode_PrimaryWDigest, NDR_IN, r);
+ }
+
+ _decode_PrimaryWDigest(p, r);
+
+ if (p->fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_FUNCTION_DEBUG(decode_PrimaryWDigest, NDR_OUT | NDR_SET_VALUES, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ /*
+ * carry over the pointer count to the reply in case we are
+ * using full pointer. See NDR specification for full pointers
+ */
+ push->ptr_count = pull->ptr_count;
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ p->out_data.rdata = ndr_push_blob(push);
+ talloc_steal(p->mem_ctx, p->out_data.rdata.data);
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_decode_trustAuthInOut(struct pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ struct decode_trustAuthInOut *r;
+
+ call = &ndr_table_drsblobs.calls[NDR_DECODE_TRUSTAUTHINOUT];
+
+ r = talloc(talloc_tos(), struct decode_trustAuthInOut);
+ if (r == NULL) {
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&p->in_data.data, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ if (p->endian) {
+ pull->flags |= LIBNDR_FLAG_BIGENDIAN;
+ }
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_FUNCTION_DEBUG(decode_trustAuthInOut, NDR_IN, r);
+ }
+
+ _decode_trustAuthInOut(p, r);
+
+ if (p->fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_FUNCTION_DEBUG(decode_trustAuthInOut, NDR_OUT | NDR_SET_VALUES, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ /*
+ * carry over the pointer count to the reply in case we are
+ * using full pointer. See NDR specification for full pointers
+ */
+ push->ptr_count = pull->ptr_count;
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ p->out_data.rdata = ndr_push_blob(push);
+ talloc_steal(p->mem_ctx, p->out_data.rdata.data);
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_decode_trustDomainPasswords(struct pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ struct decode_trustDomainPasswords *r;
+
+ call = &ndr_table_drsblobs.calls[NDR_DECODE_TRUSTDOMAINPASSWORDS];
+
+ r = talloc(talloc_tos(), struct decode_trustDomainPasswords);
+ if (r == NULL) {
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&p->in_data.data, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ if (p->endian) {
+ pull->flags |= LIBNDR_FLAG_BIGENDIAN;
+ }
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_FUNCTION_DEBUG(decode_trustDomainPasswords, NDR_IN, r);
+ }
+
+ _decode_trustDomainPasswords(p, r);
+
+ if (p->fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_FUNCTION_DEBUG(decode_trustDomainPasswords, NDR_OUT | NDR_SET_VALUES, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ /*
+ * carry over the pointer count to the reply in case we are
+ * using full pointer. See NDR specification for full pointers
+ */
+ push->ptr_count = pull->ptr_count;
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ p->out_data.rdata = ndr_push_blob(push);
+ talloc_steal(p->mem_ctx, p->out_data.rdata.data);
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_decode_ExtendedErrorInfo(struct pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ struct decode_ExtendedErrorInfo *r;
+
+ call = &ndr_table_drsblobs.calls[NDR_DECODE_EXTENDEDERRORINFO];
+
+ r = talloc(talloc_tos(), struct decode_ExtendedErrorInfo);
+ if (r == NULL) {
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&p->in_data.data, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ if (p->endian) {
+ pull->flags |= LIBNDR_FLAG_BIGENDIAN;
+ }
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_FUNCTION_DEBUG(decode_ExtendedErrorInfo, NDR_IN, r);
+ }
+
+ _decode_ExtendedErrorInfo(p, r);
+
+ if (p->fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_FUNCTION_DEBUG(decode_ExtendedErrorInfo, NDR_OUT | NDR_SET_VALUES, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ /*
+ * carry over the pointer count to the reply in case we are
+ * using full pointer. See NDR specification for full pointers
+ */
+ push->ptr_count = pull->ptr_count;
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ p->out_data.rdata = ndr_push_blob(push);
+ talloc_steal(p->mem_ctx, p->out_data.rdata.data);
+
+ talloc_free(r);
+
+ return true;
+}
+
+static bool api_decode_ForestTrustInfo(struct pipes_struct *p)
+{
+ const struct ndr_interface_call *call;
+ struct ndr_pull *pull;
+ struct ndr_push *push;
+ enum ndr_err_code ndr_err;
+ struct decode_ForestTrustInfo *r;
+
+ call = &ndr_table_drsblobs.calls[NDR_DECODE_FORESTTRUSTINFO];
+
+ r = talloc(talloc_tos(), struct decode_ForestTrustInfo);
+ if (r == NULL) {
+ return false;
+ }
+
+ pull = ndr_pull_init_blob(&p->in_data.data, r);
+ if (pull == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ pull->flags |= LIBNDR_FLAG_REF_ALLOC;
+ if (p->endian) {
+ pull->flags |= LIBNDR_FLAG_BIGENDIAN;
+ }
+ ndr_err = call->ndr_pull(pull, NDR_IN, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_FUNCTION_DEBUG(decode_ForestTrustInfo, NDR_IN, r);
+ }
+
+ _decode_ForestTrustInfo(p, r);
+
+ if (p->fault_state) {
+ talloc_free(r);
+ /* Return true here, srv_pipe_hnd.c will take care */
+ return true;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_FUNCTION_DEBUG(decode_ForestTrustInfo, NDR_OUT | NDR_SET_VALUES, r);
+ }
+
+ push = ndr_push_init_ctx(r);
+ if (push == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ /*
+ * carry over the pointer count to the reply in case we are
+ * using full pointer. See NDR specification for full pointers
+ */
+ push->ptr_count = pull->ptr_count;
+
+ ndr_err = call->ndr_push(push, NDR_OUT, r);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ talloc_free(r);
+ return false;
+ }
+
+ p->out_data.rdata = ndr_push_blob(push);
+ talloc_steal(p->mem_ctx, p->out_data.rdata.data);
+
+ talloc_free(r);
+
+ return true;
+}
+
+
+/* Tables */
+static struct api_struct api_drsblobs_cmds[] =
+{
+ {"DECODE_REPLPROPERTYMETADATA", NDR_DECODE_REPLPROPERTYMETADATA, api_decode_replPropertyMetaData},
+ {"DECODE_REPLUPTODATEVECTOR", NDR_DECODE_REPLUPTODATEVECTOR, api_decode_replUpToDateVector},
+ {"DECODE_REPSFROMTO", NDR_DECODE_REPSFROMTO, api_decode_repsFromTo},
+ {"DECODE_PARTIALATTRIBUTESET", NDR_DECODE_PARTIALATTRIBUTESET, api_decode_partialAttributeSet},
+ {"DECODE_PREFIXMAP", NDR_DECODE_PREFIXMAP, api_decode_prefixMap},
+ {"DECODE_LDAPCONTROLDIRSYNC", NDR_DECODE_LDAPCONTROLDIRSYNC, api_decode_ldapControlDirSync},
+ {"DECODE_SUPPLEMENTALCREDENTIALS", NDR_DECODE_SUPPLEMENTALCREDENTIALS, api_decode_supplementalCredentials},
+ {"DECODE_PACKAGES", NDR_DECODE_PACKAGES, api_decode_Packages},
+ {"DECODE_PRIMARYKERBEROS", NDR_DECODE_PRIMARYKERBEROS, api_decode_PrimaryKerberos},
+ {"DECODE_PRIMARYCLEARTEXT", NDR_DECODE_PRIMARYCLEARTEXT, api_decode_PrimaryCLEARTEXT},
+ {"DECODE_PRIMARYWDIGEST", NDR_DECODE_PRIMARYWDIGEST, api_decode_PrimaryWDigest},
+ {"DECODE_TRUSTAUTHINOUT", NDR_DECODE_TRUSTAUTHINOUT, api_decode_trustAuthInOut},
+ {"DECODE_TRUSTDOMAINPASSWORDS", NDR_DECODE_TRUSTDOMAINPASSWORDS, api_decode_trustDomainPasswords},
+ {"DECODE_EXTENDEDERRORINFO", NDR_DECODE_EXTENDEDERRORINFO, api_decode_ExtendedErrorInfo},
+ {"DECODE_FORESTTRUSTINFO", NDR_DECODE_FORESTTRUSTINFO, api_decode_ForestTrustInfo},
+};
+
+void drsblobs_get_pipe_fns(struct api_struct **fns, int *n_fns)
+{
+ *fns = api_drsblobs_cmds;
+ *n_fns = sizeof(api_drsblobs_cmds) / sizeof(struct api_struct);
+}
+
+NTSTATUS rpc_drsblobs_init(const struct rpc_srv_callbacks *rpc_srv_cb)
+{
+ return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "drsblobs", "drsblobs", &ndr_table_drsblobs, api_drsblobs_cmds, sizeof(api_drsblobs_cmds) / sizeof(struct api_struct), rpc_srv_cb);
+}
+
+NTSTATUS rpc_drsblobs_shutdown(void)
+{
+ return rpc_srv_unregister(&ndr_table_drsblobs);
+}