[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-3472-g47bbea2

Stefan Metzmacher metze at samba.org
Tue Feb 17 11:40:56 GMT 2009


The branch, v3-2-test has been updated
       via  47bbea27c8972ca320e90c7c678fe6da28a269f1 (commit)
       via  e065eff98c9bd57155be824eef319f4c4d191e5e (commit)
       via  9edecdaa12fa42a356008b90710475ad9a1ae581 (commit)
       via  4a353efc45480d3de91f91f618135faf8eb0429e (commit)
      from  37a29ad53eae02a29fbb0bf14731487328150d23 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit 47bbea27c8972ca320e90c7c678fe6da28a269f1
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Feb 17 10:28:37 2009 +0100

    s3:make: use pidl/pidl for 'make idl'
    
    metze
    (cherry picked from commit 3dc256ad0f1d2b1c131d67e033533dd316eab252)

commit e065eff98c9bd57155be824eef319f4c4d191e5e
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Feb 17 09:04:58 2009 +0100

    librpc: rerun 'PIDL=pidl/pidl make idl'
    
    metze
    (cherry picked from commit eb1a2e4aea76462086a4303ba325c4da49e891cd)

commit 9edecdaa12fa42a356008b90710475ad9a1ae581
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Feb 16 10:20:55 2009 +0100

    s3:netlogon: implement _netr_LogonGetCapabilities() with NT_STATUS_NOT_IMPLEMENTED
    
    This hopefully fixes bug #6100.
    
    metze
    (cherry picked from commit fe417b29bd23b7b935669993e0f01de4c7de2378)
    (cherry picked from commit 2f858cb914842e9af1331477ec6eb9782dbd0cf5)

commit 4a353efc45480d3de91f91f618135faf8eb0429e
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Feb 16 10:42:43 2009 +0100

    netlogon.idl: add idl for netr_LogonGetCapabilities()
    
    metze
    (cherry picked from commit 8339969ed39e4cf3577971869ef2fd127f1c3ae3)
    (cherry picked from commit 5410134c70e3302c05b73109610c28dfa1a0dc69)

-----------------------------------------------------------------------

Summary of changes:
 source/Makefile.in                   |    4 +-
 source/librpc/gen_ndr/cli_netlogon.c |   32 +++--
 source/librpc/gen_ndr/cli_netlogon.h |   11 ++-
 source/librpc/gen_ndr/ndr_netlogon.c |  221 +++++++++++++++++++++++++++++++--
 source/librpc/gen_ndr/ndr_netlogon.h |    5 +-
 source/librpc/gen_ndr/netlogon.h     |   18 +++-
 source/librpc/gen_ndr/srv_netlogon.c |   24 +++--
 source/librpc/gen_ndr/srv_netlogon.h |    2 +-
 source/librpc/idl/netlogon.idl       |   13 ++-
 source/rpc_server/srv_netlog_nt.c    |    7 +-
 10 files changed, 289 insertions(+), 48 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/Makefile.in b/source/Makefile.in
index 7a30c04..a7ddf9c 100644
--- a/source/Makefile.in
+++ b/source/Makefile.in
@@ -1153,8 +1153,10 @@ IDL_FILES = lsa.idl dfs.idl echo.idl winreg.idl initshutdown.idl \
 	epmapper.idl messaging.idl xattr.idl misc.idl samr.idl security.idl \
 	dssetup.idl krb5pac.idl ntsvcs.idl libnetapi.idl
 
+PIDL = "$(srcdir)/pidl/pidl"
+
 idl::
-	@IDL_FILES="$(IDL_FILES)" CPP="$(CPP)" PERL="$(PERL)" \
+	@IDL_FILES="$(IDL_FILES)" CPP="$(CPP)" PERL="$(PERL)" PIDL="$(PIDL)"\
 	 srcdir="$(srcdir)" $(srcdir)/script/build_idl.sh $(PIDL_ARGS)
 
 
diff --git a/source/librpc/gen_ndr/cli_netlogon.c b/source/librpc/gen_ndr/cli_netlogon.c
index f5b4715..e6b77ee 100644
--- a/source/librpc/gen_ndr/cli_netlogon.c
+++ b/source/librpc/gen_ndr/cli_netlogon.c
@@ -1107,24 +1107,34 @@ 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_do_rpc_ndr(cli,
 				mem_ctx,
 				PI_NETLOGON,
 				&ndr_table_netlogon,
-				NDR_NETR_NETRLOGONDUMMYROUTINE1,
+				NDR_NETR_LOGONGETCAPABILITIES,
 				&r);
 
 	if (!NT_STATUS_IS_OK(status)) {
@@ -1132,7 +1142,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)) {
@@ -1140,13 +1150,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/source/librpc/gen_ndr/cli_netlogon.h b/source/librpc/gen_ndr/cli_netlogon.h
index 2033315..8ab25c9 100644
--- a/source/librpc/gen_ndr/cli_netlogon.h
+++ b/source/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/source/librpc/gen_ndr/ndr_netlogon.c b/source/librpc/gen_ndr/ndr_netlogon.c
index b43a157..e7df081 100644
--- a/source/librpc/gen_ndr/ndr_netlogon.c
+++ b/source/librpc/gen_ndr/ndr_netlogon.c
@@ -6385,6 +6385,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_BinaryString(struct ndr_push *ndr, int ndr_flags, const struct netr_BinaryString *r)
 {
 	uint32_t cntr_data_1;
@@ -11314,42 +11387,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--;
@@ -14885,11 +15078,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/source/librpc/gen_ndr/ndr_netlogon.h b/source/librpc/gen_ndr/ndr_netlogon.h
index a9d36ae..7001a70 100644
--- a/source/librpc/gen_ndr/ndr_netlogon.h
+++ b/source/librpc/gen_ndr/ndr_netlogon.h
@@ -53,7 +53,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)
 
@@ -195,6 +195,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_BinaryString(struct ndr_print *ndr, const char *name, const struct netr_BinaryString *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);
@@ -232,7 +233,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/source/librpc/gen_ndr/netlogon.h b/source/librpc/gen_ndr/netlogon.h
index 1cea1f0..0b38ecd 100644
--- a/source/librpc/gen_ndr/netlogon.h
+++ b/source/librpc/gen_ndr/netlogon.h
@@ -736,6 +736,10 @@ struct netr_DsRGetDCNameInfo {
 	const char *client_site_name;/* [unique,charset(UTF16)] */
 }/* [public] */;
 
+union netr_Capabilities {
+	uint32_t server_capabilities;/* [case] */
+}/* [switch_type(uint32)] */;
+
 struct netr_BinaryString {
 	uint16_t length;
 	uint16_t size;
@@ -1234,9 +1238,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/source/librpc/gen_ndr/srv_netlogon.c b/source/librpc/gen_ndr/srv_netlogon.c
index 67876f1..f491f5c 100644
--- a/source/librpc/gen_ndr/srv_netlogon.c
+++ b/source/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)
 	}
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list