summaryrefslogtreecommitdiff
path: root/librpc/gen_ndr
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-02-16 10:59:45 +0100
committerStefan Metzmacher <metze@samba.org>2009-02-16 10:59:45 +0100
commit81e556f366322e3c07c1d7be4e989542380aed0e (patch)
tree155728c4414e36b0c8b309bbd6dca4205ce3b96e /librpc/gen_ndr
parent8339969ed39e4cf3577971869ef2fd127f1c3ae3 (diff)
downloadsamba-81e556f366322e3c07c1d7be4e989542380aed0e.tar.gz
samba-81e556f366322e3c07c1d7be4e989542380aed0e.tar.bz2
samba-81e556f366322e3c07c1d7be4e989542380aed0e.zip
librpc: rerun make idl
metze
Diffstat (limited to 'librpc/gen_ndr')
-rw-r--r--librpc/gen_ndr/cli_netlogon.c32
-rw-r--r--librpc/gen_ndr/cli_netlogon.h11
-rw-r--r--librpc/gen_ndr/ndr_netlogon.c221
-rw-r--r--librpc/gen_ndr/ndr_netlogon.h5
-rw-r--r--librpc/gen_ndr/netlogon.h18
-rw-r--r--librpc/gen_ndr/srv_netlogon.c37
-rw-r--r--librpc/gen_ndr/srv_netlogon.h4
7 files changed, 282 insertions, 46 deletions
diff --git a/librpc/gen_ndr/cli_netlogon.c b/librpc/gen_ndr/cli_netlogon.c
index 456bb71a3d..eb726f0ed6 100644
--- a/librpc/gen_ndr/cli_netlogon.c
+++ b/librpc/gen_ndr/cli_netlogon.c
@@ -1086,23 +1086,33 @@ NTSTATUS rpccli_netr_DsRGetDCName(struct rpc_pipe_client *cli,
return werror_to_ntstatus(r.out.result);
}
-NTSTATUS rpccli_netr_NETRLOGONDUMMYROUTINE1(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx,
- WERROR *werror)
+NTSTATUS rpccli_netr_LogonGetCapabilities(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ const char *server_name /* [in] [charset(UTF16)] */,
+ const char *computer_name /* [in] [unique,charset(UTF16)] */,
+ struct netr_Authenticator *credential /* [in] [ref] */,
+ struct netr_Authenticator *return_authenticator /* [in,out] [ref] */,
+ uint32_t query_level /* [in] */,
+ union netr_Capabilities *capabilities /* [out] [ref,switch_is(query_level)] */)
{
- struct netr_NETRLOGONDUMMYROUTINE1 r;
+ struct netr_LogonGetCapabilities r;
NTSTATUS status;
/* In parameters */
+ r.in.server_name = server_name;
+ r.in.computer_name = computer_name;
+ r.in.credential = credential;
+ r.in.return_authenticator = return_authenticator;
+ r.in.query_level = query_level;
if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(netr_NETRLOGONDUMMYROUTINE1, &r);
+ NDR_PRINT_IN_DEBUG(netr_LogonGetCapabilities, &r);
}
status = cli->dispatch(cli,
mem_ctx,
&ndr_table_netlogon,
- NDR_NETR_NETRLOGONDUMMYROUTINE1,
+ NDR_NETR_LOGONGETCAPABILITIES,
&r);
if (!NT_STATUS_IS_OK(status)) {
@@ -1110,7 +1120,7 @@ NTSTATUS rpccli_netr_NETRLOGONDUMMYROUTINE1(struct rpc_pipe_client *cli,
}
if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(netr_NETRLOGONDUMMYROUTINE1, &r);
+ NDR_PRINT_OUT_DEBUG(netr_LogonGetCapabilities, &r);
}
if (NT_STATUS_IS_ERR(status)) {
@@ -1118,13 +1128,11 @@ NTSTATUS rpccli_netr_NETRLOGONDUMMYROUTINE1(struct rpc_pipe_client *cli,
}
/* Return variables */
+ *return_authenticator = *r.out.return_authenticator;
+ *capabilities = *r.out.capabilities;
/* Return result */
- if (werror) {
- *werror = r.out.result;
- }
-
- return werror_to_ntstatus(r.out.result);
+ return r.out.result;
}
NTSTATUS rpccli_netr_NETRLOGONSETSERVICEBITS(struct rpc_pipe_client *cli,
diff --git a/librpc/gen_ndr/cli_netlogon.h b/librpc/gen_ndr/cli_netlogon.h
index dd086a908a..718fcde3d7 100644
--- a/librpc/gen_ndr/cli_netlogon.h
+++ b/librpc/gen_ndr/cli_netlogon.h
@@ -183,9 +183,14 @@ NTSTATUS rpccli_netr_DsRGetDCName(struct rpc_pipe_client *cli,
uint32_t flags /* [in] */,
struct netr_DsRGetDCNameInfo **info /* [out] [ref] */,
WERROR *werror);
-NTSTATUS rpccli_netr_NETRLOGONDUMMYROUTINE1(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx,
- WERROR *werror);
+NTSTATUS rpccli_netr_LogonGetCapabilities(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ const char *server_name /* [in] [charset(UTF16)] */,
+ const char *computer_name /* [in] [unique,charset(UTF16)] */,
+ struct netr_Authenticator *credential /* [in] [ref] */,
+ struct netr_Authenticator *return_authenticator /* [in,out] [ref] */,
+ uint32_t query_level /* [in] */,
+ union netr_Capabilities *capabilities /* [out] [ref,switch_is(query_level)] */);
NTSTATUS rpccli_netr_NETRLOGONSETSERVICEBITS(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
WERROR *werror);
diff --git a/librpc/gen_ndr/ndr_netlogon.c b/librpc/gen_ndr/ndr_netlogon.c
index 11a3c5e44c..c1bdce4abd 100644
--- a/librpc/gen_ndr/ndr_netlogon.c
+++ b/librpc/gen_ndr/ndr_netlogon.c
@@ -7079,6 +7079,79 @@ _PUBLIC_ void ndr_print_netr_DsRGetDCNameInfo(struct ndr_print *ndr, const char
ndr->depth--;
}
+static enum ndr_err_code ndr_push_netr_Capabilities(struct ndr_push *ndr, int ndr_flags, const union netr_Capabilities *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ int level = ndr_push_get_switch_value(ndr, r);
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
+ switch (level) {
+ case 1: {
+ NDR_CHECK(ndr_push_netr_NegotiateFlags(ndr, NDR_SCALARS, r->server_capabilities));
+ break; }
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ int level = ndr_push_get_switch_value(ndr, r);
+ switch (level) {
+ case 1:
+ break;
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_netr_Capabilities(struct ndr_pull *ndr, int ndr_flags, union netr_Capabilities *r)
+{
+ int level;
+ uint32_t _level;
+ level = ndr_pull_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
+ if (_level != level) {
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
+ }
+ switch (level) {
+ case 1: {
+ NDR_CHECK(ndr_pull_netr_NegotiateFlags(ndr, NDR_SCALARS, &r->server_capabilities));
+ break; }
+
+ default:
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case 1:
+ break;
+
+ default:
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_netr_Capabilities(struct ndr_print *ndr, const char *name, const union netr_Capabilities *r)
+{
+ int level;
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "netr_Capabilities");
+ switch (level) {
+ case 1:
+ ndr_print_netr_NegotiateFlags(ndr, "server_capabilities", r->server_capabilities);
+ break;
+
+ default:
+ ndr_print_bad_level(ndr, name, level);
+ }
+}
+
static enum ndr_err_code ndr_push_netr_TrustFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
{
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
@@ -12358,42 +12431,162 @@ _PUBLIC_ void ndr_print_netr_DsRGetDCName(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
-static enum ndr_err_code ndr_push_netr_NETRLOGONDUMMYROUTINE1(struct ndr_push *ndr, int flags, const struct netr_NETRLOGONDUMMYROUTINE1 *r)
+static enum ndr_err_code ndr_push_netr_LogonGetCapabilities(struct ndr_push *ndr, int flags, const struct netr_LogonGetCapabilities *r)
{
if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.computer_name));
+ if (r->in.computer_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->in.credential == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
+ if (r->in.return_authenticator == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.query_level));
}
if (flags & NDR_OUT) {
- NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
+ if (r->out.return_authenticator == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
+ if (r->out.capabilities == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.capabilities, r->in.query_level));
+ NDR_CHECK(ndr_push_netr_Capabilities(ndr, NDR_SCALARS, r->out.capabilities));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
}
return NDR_ERR_SUCCESS;
}
-static enum ndr_err_code ndr_pull_netr_NETRLOGONDUMMYROUTINE1(struct ndr_pull *ndr, int flags, struct netr_NETRLOGONDUMMYROUTINE1 *r)
+static enum ndr_err_code ndr_pull_netr_LogonGetCapabilities(struct ndr_pull *ndr, int flags, struct netr_LogonGetCapabilities *r)
{
+ uint32_t _ptr_computer_name;
+ TALLOC_CTX *_mem_save_computer_name_0;
+ TALLOC_CTX *_mem_save_credential_0;
+ TALLOC_CTX *_mem_save_return_authenticator_0;
+ TALLOC_CTX *_mem_save_capabilities_0;
if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
+ if (ndr_get_array_length(ndr, &r->in.server_name) > ndr_get_array_size(ndr, &r->in.server_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_name), ndr_get_array_length(ndr, &r->in.server_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_computer_name));
+ if (_ptr_computer_name) {
+ NDR_PULL_ALLOC(ndr, r->in.computer_name);
+ } else {
+ r->in.computer_name = NULL;
+ }
+ if (r->in.computer_name) {
+ _mem_save_computer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.computer_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
+ if (ndr_get_array_length(ndr, &r->in.computer_name) > ndr_get_array_size(ndr, &r->in.computer_name)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.computer_name), ndr_get_array_length(ndr, &r->in.computer_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_computer_name_0, 0);
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.credential);
+ }
+ _mem_save_credential_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.credential, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.credential));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_credential_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.return_authenticator);
+ }
+ _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.query_level));
+ NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
+ *r->out.return_authenticator = *r->in.return_authenticator;
+ NDR_PULL_ALLOC(ndr, r->out.capabilities);
+ ZERO_STRUCTP(r->out.capabilities);
}
if (flags & NDR_OUT) {
- NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.return_authenticator);
+ }
+ _mem_save_return_authenticator_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.return_authenticator, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->out.return_authenticator));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.capabilities);
+ }
+ _mem_save_capabilities_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.capabilities, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.capabilities, r->in.query_level));
+ NDR_CHECK(ndr_pull_netr_Capabilities(ndr, NDR_SCALARS, r->out.capabilities));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_capabilities_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
}
return NDR_ERR_SUCCESS;
}
-_PUBLIC_ void ndr_print_netr_NETRLOGONDUMMYROUTINE1(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONDUMMYROUTINE1 *r)
+_PUBLIC_ void ndr_print_netr_LogonGetCapabilities(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonGetCapabilities *r)
{
- ndr_print_struct(ndr, name, "netr_NETRLOGONDUMMYROUTINE1");
+ ndr_print_struct(ndr, name, "netr_LogonGetCapabilities");
ndr->depth++;
if (flags & NDR_SET_VALUES) {
ndr->flags |= LIBNDR_PRINT_SET_VALUES;
}
if (flags & NDR_IN) {
- ndr_print_struct(ndr, "in", "netr_NETRLOGONDUMMYROUTINE1");
+ ndr_print_struct(ndr, "in", "netr_LogonGetCapabilities");
ndr->depth++;
+ ndr_print_string(ndr, "server_name", r->in.server_name);
+ ndr_print_ptr(ndr, "computer_name", r->in.computer_name);
+ ndr->depth++;
+ if (r->in.computer_name) {
+ ndr_print_string(ndr, "computer_name", r->in.computer_name);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "credential", r->in.credential);
+ ndr->depth++;
+ ndr_print_netr_Authenticator(ndr, "credential", r->in.credential);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "return_authenticator", r->in.return_authenticator);
+ ndr->depth++;
+ ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "query_level", r->in.query_level);
ndr->depth--;
}
if (flags & NDR_OUT) {
- ndr_print_struct(ndr, "out", "netr_NETRLOGONDUMMYROUTINE1");
+ ndr_print_struct(ndr, "out", "netr_LogonGetCapabilities");
ndr->depth++;
- ndr_print_WERROR(ndr, "result", r->out.result);
+ ndr_print_ptr(ndr, "return_authenticator", r->out.return_authenticator);
+ ndr->depth++;
+ ndr_print_netr_Authenticator(ndr, "return_authenticator", r->out.return_authenticator);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "capabilities", r->out.capabilities);
+ ndr->depth++;
+ ndr_print_set_switch_value(ndr, r->out.capabilities, r->in.query_level);
+ ndr_print_netr_Capabilities(ndr, "capabilities", r->out.capabilities);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
ndr->depth--;
}
ndr->depth--;
@@ -16147,11 +16340,11 @@ static const struct ndr_interface_call netlogon_calls[] = {
false,
},
{
- "netr_NETRLOGONDUMMYROUTINE1",
- sizeof(struct netr_NETRLOGONDUMMYROUTINE1),
- (ndr_push_flags_fn_t) ndr_push_netr_NETRLOGONDUMMYROUTINE1,
- (ndr_pull_flags_fn_t) ndr_pull_netr_NETRLOGONDUMMYROUTINE1,
- (ndr_print_function_t) ndr_print_netr_NETRLOGONDUMMYROUTINE1,
+ "netr_LogonGetCapabilities",
+ sizeof(struct netr_LogonGetCapabilities),
+ (ndr_push_flags_fn_t) ndr_push_netr_LogonGetCapabilities,
+ (ndr_pull_flags_fn_t) ndr_pull_netr_LogonGetCapabilities,
+ (ndr_print_function_t) ndr_print_netr_LogonGetCapabilities,
false,
},
{
diff --git a/librpc/gen_ndr/ndr_netlogon.h b/librpc/gen_ndr/ndr_netlogon.h
index f88310f870..e057551006 100644
--- a/librpc/gen_ndr/ndr_netlogon.h
+++ b/librpc/gen_ndr/ndr_netlogon.h
@@ -54,7 +54,7 @@ extern const struct ndr_interface_table ndr_table_netlogon;
#define NDR_NETR_DSRGETDCNAME (0x14)
-#define NDR_NETR_NETRLOGONDUMMYROUTINE1 (0x15)
+#define NDR_NETR_LOGONGETCAPABILITIES (0x15)
#define NDR_NETR_NETRLOGONSETSERVICEBITS (0x16)
@@ -205,6 +205,7 @@ void ndr_print_netr_DsR_DcFlags(struct ndr_print *ndr, const char *name, uint32_
enum ndr_err_code ndr_push_netr_DsRGetDCNameInfo(struct ndr_push *ndr, int ndr_flags, const struct netr_DsRGetDCNameInfo *r);
enum ndr_err_code ndr_pull_netr_DsRGetDCNameInfo(struct ndr_pull *ndr, int ndr_flags, struct netr_DsRGetDCNameInfo *r);
void ndr_print_netr_DsRGetDCNameInfo(struct ndr_print *ndr, const char *name, const struct netr_DsRGetDCNameInfo *r);
+void ndr_print_netr_Capabilities(struct ndr_print *ndr, const char *name, const union netr_Capabilities *r);
void ndr_print_netr_TrustFlags(struct ndr_print *ndr, const char *name, uint32_t r);
void ndr_print_netr_DomainQuery1(struct ndr_print *ndr, const char *name, const struct netr_DomainQuery1 *r);
void ndr_print_netr_DomainQuery(struct ndr_print *ndr, const char *name, const union netr_DomainQuery *r);
@@ -250,7 +251,7 @@ void ndr_print_netr_DatabaseRedo(struct ndr_print *ndr, const char *name, int fl
void ndr_print_netr_LogonControl2Ex(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonControl2Ex *r);
void ndr_print_netr_NetrEnumerateTrustedDomains(struct ndr_print *ndr, const char *name, int flags, const struct netr_NetrEnumerateTrustedDomains *r);
void ndr_print_netr_DsRGetDCName(struct ndr_print *ndr, const char *name, int flags, const struct netr_DsRGetDCName *r);
-void ndr_print_netr_NETRLOGONDUMMYROUTINE1(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONDUMMYROUTINE1 *r);
+void ndr_print_netr_LogonGetCapabilities(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonGetCapabilities *r);
void ndr_print_netr_NETRLOGONSETSERVICEBITS(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONSETSERVICEBITS *r);
void ndr_print_netr_LogonGetTrustRid(struct ndr_print *ndr, const char *name, int flags, const struct netr_LogonGetTrustRid *r);
void ndr_print_netr_NETRLOGONCOMPUTESERVERDIGEST(struct ndr_print *ndr, const char *name, int flags, const struct netr_NETRLOGONCOMPUTESERVERDIGEST *r);
diff --git a/librpc/gen_ndr/netlogon.h b/librpc/gen_ndr/netlogon.h
index 97116c8c15..d1038d76c8 100644
--- a/librpc/gen_ndr/netlogon.h
+++ b/librpc/gen_ndr/netlogon.h
@@ -832,6 +832,10 @@ struct netr_DsRGetDCNameInfo {
const char *client_site_name;/* [unique,charset(UTF16)] */
}/* [public] */;
+union netr_Capabilities {
+ uint32_t server_capabilities;/* [case] */
+}/* [switch_type(uint32)] */;
+
/* bitmap netr_TrustFlags */
#define NETR_TRUST_FLAG_IN_FOREST ( 0x00000001 )
#define NETR_TRUST_FLAG_OUTBOUND ( 0x00000002 )
@@ -1365,9 +1369,19 @@ struct netr_DsRGetDCName {
};
-struct netr_NETRLOGONDUMMYROUTINE1 {
+struct netr_LogonGetCapabilities {
struct {
- WERROR result;
+ const char *server_name;/* [charset(UTF16)] */
+ const char *computer_name;/* [unique,charset(UTF16)] */
+ struct netr_Authenticator *credential;/* [ref] */
+ uint32_t query_level;
+ struct netr_Authenticator *return_authenticator;/* [ref] */
+ } in;
+
+ struct {
+ union netr_Capabilities *capabilities;/* [ref,switch_is(query_level)] */
+ struct netr_Authenticator *return_authenticator;/* [ref] */
+ NTSTATUS result;
} out;
};
diff --git a/librpc/gen_ndr/srv_netlogon.c b/librpc/gen_ndr/srv_netlogon.c
index 398146e566..4515ca0a82 100644
--- a/librpc/gen_ndr/srv_netlogon.c
+++ b/librpc/gen_ndr/srv_netlogon.c
@@ -1735,18 +1735,18 @@ static bool api_netr_DsRGetDCName(pipes_struct *p)
return true;
}
-static bool api_netr_NETRLOGONDUMMYROUTINE1(pipes_struct *p)
+static bool api_netr_LogonGetCapabilities(pipes_struct *p)
{
const struct ndr_interface_call *call;
struct ndr_pull *pull;
struct ndr_push *push;
enum ndr_err_code ndr_err;
DATA_BLOB blob;
- struct netr_NETRLOGONDUMMYROUTINE1 *r;
+ struct netr_LogonGetCapabilities *r;
- call = &ndr_table_netlogon.calls[NDR_NETR_NETRLOGONDUMMYROUTINE1];
+ call = &ndr_table_netlogon.calls[NDR_NETR_LOGONGETCAPABILITIES];
- r = talloc(talloc_tos(), struct netr_NETRLOGONDUMMYROUTINE1);
+ r = talloc(talloc_tos(), struct netr_LogonGetCapabilities);
if (r == NULL) {
return false;
}
@@ -1770,10 +1770,18 @@ static bool api_netr_NETRLOGONDUMMYROUTINE1(pipes_struct *p)
}
if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(netr_NETRLOGONDUMMYROUTINE1, r);
+ NDR_PRINT_IN_DEBUG(netr_LogonGetCapabilities, r);
}
- r->out.result = _netr_NETRLOGONDUMMYROUTINE1(p, r);
+ ZERO_STRUCT(r->out);
+ r->out.return_authenticator = r->in.return_authenticator;
+ r->out.capabilities = talloc_zero(r, union netr_Capabilities);
+ if (r->out.capabilities == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ r->out.result = _netr_LogonGetCapabilities(p, r);
if (p->rng_fault_state) {
talloc_free(r);
@@ -1782,7 +1790,7 @@ static bool api_netr_NETRLOGONDUMMYROUTINE1(pipes_struct *p)
}
if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(netr_NETRLOGONDUMMYROUTINE1, r);
+ NDR_PRINT_OUT_DEBUG(netr_LogonGetCapabilities, r);
}
push = ndr_push_init_ctx(r, NULL);
@@ -3856,7 +3864,7 @@ static struct api_struct api_netlogon_cmds[] =
{"NETR_LOGONCONTROL2EX", NDR_NETR_LOGONCONTROL2EX, api_netr_LogonControl2Ex},
{"NETR_NETRENUMERATETRUSTEDDOMAINS", NDR_NETR_NETRENUMERATETRUSTEDDOMAINS, api_netr_NetrEnumerateTrustedDomains},
{"NETR_DSRGETDCNAME", NDR_NETR_DSRGETDCNAME, api_netr_DsRGetDCName},
- {"NETR_NETRLOGONDUMMYROUTINE1", NDR_NETR_NETRLOGONDUMMYROUTINE1, api_netr_NETRLOGONDUMMYROUTINE1},
+ {"NETR_LOGONGETCAPABILITIES", NDR_NETR_LOGONGETCAPABILITIES, api_netr_LogonGetCapabilities},
{"NETR_NETRLOGONSETSERVICEBITS", NDR_NETR_NETRLOGONSETSERVICEBITS, api_netr_NETRLOGONSETSERVICEBITS},
{"NETR_LOGONGETTRUSTRID", NDR_NETR_LOGONGETTRUSTRID, api_netr_LogonGetTrustRid},
{"NETR_NETRLOGONCOMPUTESERVERDIGEST", NDR_NETR_NETRLOGONCOMPUTESERVERDIGEST, api_netr_NETRLOGONCOMPUTESERVERDIGEST},
@@ -4193,9 +4201,16 @@ NTSTATUS rpc_netlogon_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
return NT_STATUS_OK;
}
- case NDR_NETR_NETRLOGONDUMMYROUTINE1: {
- struct netr_NETRLOGONDUMMYROUTINE1 *r = (struct netr_NETRLOGONDUMMYROUTINE1 *)_r;
- r->out.result = _netr_NETRLOGONDUMMYROUTINE1(cli->pipes_struct, r);
+ case NDR_NETR_LOGONGETCAPABILITIES: {
+ struct netr_LogonGetCapabilities *r = (struct netr_LogonGetCapabilities *)_r;
+ ZERO_STRUCT(r->out);
+ r->out.return_authenticator = r->in.return_authenticator;
+ r->out.capabilities = talloc_zero(mem_ctx, union netr_Capabilities);
+ if (r->out.capabilities == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ r->out.result = _netr_LogonGetCapabilities(cli->pipes_struct, r);
return NT_STATUS_OK;
}
diff --git a/librpc/gen_ndr/srv_netlogon.h b/librpc/gen_ndr/srv_netlogon.h
index b9d9b7e28d..521f08f688 100644
--- a/librpc/gen_ndr/srv_netlogon.h
+++ b/librpc/gen_ndr/srv_netlogon.h
@@ -22,7 +22,7 @@ NTSTATUS _netr_DatabaseRedo(pipes_struct *p, struct netr_DatabaseRedo *r);
WERROR _netr_LogonControl2Ex(pipes_struct *p, struct netr_LogonControl2Ex *r);
WERROR _netr_NetrEnumerateTrustedDomains(pipes_struct *p, struct netr_NetrEnumerateTrustedDomains *r);
WERROR _netr_DsRGetDCName(pipes_struct *p, struct netr_DsRGetDCName *r);
-WERROR _netr_NETRLOGONDUMMYROUTINE1(pipes_struct *p, struct netr_NETRLOGONDUMMYROUTINE1 *r);
+NTSTATUS _netr_LogonGetCapabilities(pipes_struct *p, struct netr_LogonGetCapabilities *r);
WERROR _netr_NETRLOGONSETSERVICEBITS(pipes_struct *p, struct netr_NETRLOGONSETSERVICEBITS *r);
WERROR _netr_LogonGetTrustRid(pipes_struct *p, struct netr_LogonGetTrustRid *r);
WERROR _netr_NETRLOGONCOMPUTESERVERDIGEST(pipes_struct *p, struct netr_NETRLOGONCOMPUTESERVERDIGEST *r);
@@ -71,7 +71,7 @@ NTSTATUS _netr_DatabaseRedo(pipes_struct *p, struct netr_DatabaseRedo *r);
WERROR _netr_LogonControl2Ex(pipes_struct *p, struct netr_LogonControl2Ex *r);
WERROR _netr_NetrEnumerateTrustedDomains(pipes_struct *p, struct netr_NetrEnumerateTrustedDomains *r);
WERROR _netr_DsRGetDCName(pipes_struct *p, struct netr_DsRGetDCName *r);
-WERROR _netr_NETRLOGONDUMMYROUTINE1(pipes_struct *p, struct netr_NETRLOGONDUMMYROUTINE1 *r);
+NTSTATUS _netr_LogonGetCapabilities(pipes_struct *p, struct netr_LogonGetCapabilities *r);
WERROR _netr_NETRLOGONSETSERVICEBITS(pipes_struct *p, struct netr_NETRLOGONSETSERVICEBITS *r);
WERROR _netr_LogonGetTrustRid(pipes_struct *p, struct netr_LogonGetTrustRid *r);
WERROR _netr_NETRLOGONCOMPUTESERVERDIGEST(pipes_struct *p, struct netr_NETRLOGONCOMPUTESERVERDIGEST *r);