summaryrefslogtreecommitdiff
path: root/librpc/gen_ndr
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-08-26 14:45:35 +0200
committerGünther Deschner <gd@samba.org>2009-08-27 15:55:18 +0200
commit5a1577884819ccaa21741beb6765819cf640cdc9 (patch)
tree3ce68feb770538e3ec40cd440f5ea3f6c25748e5 /librpc/gen_ndr
parent17d3800e923fd51f6dd9799d39d56a012f2ad600 (diff)
downloadsamba-5a1577884819ccaa21741beb6765819cf640cdc9.tar.gz
samba-5a1577884819ccaa21741beb6765819cf640cdc9.tar.bz2
samba-5a1577884819ccaa21741beb6765819cf640cdc9.zip
schannel: add netlogon_creds_CredentialState to IDL.
Guenther
Diffstat (limited to 'librpc/gen_ndr')
-rw-r--r--librpc/gen_ndr/ndr_schannel.c111
-rw-r--r--librpc/gen_ndr/ndr_schannel.h3
-rw-r--r--librpc/gen_ndr/schannel.h13
3 files changed, 127 insertions, 0 deletions
diff --git a/librpc/gen_ndr/ndr_schannel.c b/librpc/gen_ndr/ndr_schannel.c
index 7646f815f7..d83d04bad2 100644
--- a/librpc/gen_ndr/ndr_schannel.c
+++ b/librpc/gen_ndr/ndr_schannel.c
@@ -277,3 +277,114 @@ _PUBLIC_ void ndr_print_schannel_bind_ack(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
+_PUBLIC_ enum ndr_err_code ndr_push_netlogon_creds_CredentialState(struct ndr_push *ndr, int ndr_flags, const struct netlogon_creds_CredentialState *r)
+{
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_netr_NegotiateFlags(ndr, NDR_SCALARS, r->negotiate_flags));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->session_key, 16));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sequence));
+ NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, &r->seed));
+ NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, &r->client));
+ NDR_CHECK(ndr_push_netr_Credential(ndr, NDR_SCALARS, &r->server));
+ NDR_CHECK(ndr_push_netr_SchannelType(ndr, NDR_SCALARS, r->secure_channel_type));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->computer_name, CH_UTF8)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->computer_name, CH_UTF8)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->computer_name, ndr_charset_length(r->computer_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->account_name, CH_UTF8)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->account_name, CH_UTF8)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->account_name, ndr_charset_length(r->account_name, CH_UTF8), sizeof(uint8_t), CH_UTF8));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->sid) {
+ NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->sid));
+ }
+ }
+ ndr->flags = _flags_save_STRUCT;
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_netlogon_creds_CredentialState(struct ndr_pull *ndr, int ndr_flags, struct netlogon_creds_CredentialState *r)
+{
+ uint32_t _ptr_sid;
+ TALLOC_CTX *_mem_save_sid_0;
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_netr_NegotiateFlags(ndr, NDR_SCALARS, &r->negotiate_flags));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->session_key, 16));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sequence));
+ NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, &r->seed));
+ NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, &r->client));
+ NDR_CHECK(ndr_pull_netr_Credential(ndr, NDR_SCALARS, &r->server));
+ NDR_CHECK(ndr_pull_netr_SchannelType(ndr, NDR_SCALARS, &r->secure_channel_type));
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->computer_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->computer_name));
+ if (ndr_get_array_length(ndr, &r->computer_name) > ndr_get_array_size(ndr, &r->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->computer_name), ndr_get_array_length(ndr, &r->computer_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->computer_name), sizeof(uint8_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->computer_name, ndr_get_array_length(ndr, &r->computer_name), sizeof(uint8_t), CH_UTF8));
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->account_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->account_name));
+ if (ndr_get_array_length(ndr, &r->account_name) > ndr_get_array_size(ndr, &r->account_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->account_name), ndr_get_array_length(ndr, &r->account_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->account_name), sizeof(uint8_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->account_name, ndr_get_array_length(ndr, &r->account_name), sizeof(uint8_t), CH_UTF8));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
+ if (_ptr_sid) {
+ NDR_PULL_ALLOC(ndr, r->sid);
+ } else {
+ r->sid = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->sid) {
+ _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
+ NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->sid));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
+ }
+ }
+ ndr->flags = _flags_save_STRUCT;
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_netlogon_creds_CredentialState(struct ndr_print *ndr, const char *name, const struct netlogon_creds_CredentialState *r)
+{
+ ndr_print_struct(ndr, name, "netlogon_creds_CredentialState");
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+ ndr->depth++;
+ ndr_print_netr_NegotiateFlags(ndr, "negotiate_flags", r->negotiate_flags);
+ ndr_print_array_uint8(ndr, "session_key", r->session_key, 16);
+ ndr_print_uint32(ndr, "sequence", r->sequence);
+ ndr_print_netr_Credential(ndr, "seed", &r->seed);
+ ndr_print_netr_Credential(ndr, "client", &r->client);
+ ndr_print_netr_Credential(ndr, "server", &r->server);
+ ndr_print_netr_SchannelType(ndr, "secure_channel_type", r->secure_channel_type);
+ ndr_print_string(ndr, "computer_name", r->computer_name);
+ ndr_print_string(ndr, "account_name", r->account_name);
+ ndr_print_ptr(ndr, "sid", r->sid);
+ ndr->depth++;
+ if (r->sid) {
+ ndr_print_dom_sid(ndr, "sid", r->sid);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ ndr->flags = _flags_save_STRUCT;
+ }
+}
+
diff --git a/librpc/gen_ndr/ndr_schannel.h b/librpc/gen_ndr/ndr_schannel.h
index 0443b51b8b..b9be2446d5 100644
--- a/librpc/gen_ndr/ndr_schannel.h
+++ b/librpc/gen_ndr/ndr_schannel.h
@@ -16,4 +16,7 @@ void ndr_print_schannel_bind(struct ndr_print *ndr, const char *name, const stru
enum ndr_err_code ndr_push_schannel_bind_ack(struct ndr_push *ndr, int ndr_flags, const struct schannel_bind_ack *r);
enum ndr_err_code ndr_pull_schannel_bind_ack(struct ndr_pull *ndr, int ndr_flags, struct schannel_bind_ack *r);
void ndr_print_schannel_bind_ack(struct ndr_print *ndr, const char *name, const struct schannel_bind_ack *r);
+enum ndr_err_code ndr_push_netlogon_creds_CredentialState(struct ndr_push *ndr, int ndr_flags, const struct netlogon_creds_CredentialState *r);
+enum ndr_err_code ndr_pull_netlogon_creds_CredentialState(struct ndr_pull *ndr, int ndr_flags, struct netlogon_creds_CredentialState *r);
+void ndr_print_netlogon_creds_CredentialState(struct ndr_print *ndr, const char *name, const struct netlogon_creds_CredentialState *r);
#endif /* _HEADER_NDR_schannel */
diff --git a/librpc/gen_ndr/schannel.h b/librpc/gen_ndr/schannel.h
index f4d6e60131..d7e3ab3970 100644
--- a/librpc/gen_ndr/schannel.h
+++ b/librpc/gen_ndr/schannel.h
@@ -38,4 +38,17 @@ struct schannel_bind_ack {
uint32_t unknown3;
}/* [public] */;
+struct netlogon_creds_CredentialState {
+ uint32_t negotiate_flags;
+ uint8_t session_key[16];
+ uint32_t sequence;
+ struct netr_Credential seed;
+ struct netr_Credential client;
+ struct netr_Credential server;
+ enum netr_SchannelType secure_channel_type;
+ const char *computer_name;/* [charset(UTF8)] */
+ const char *account_name;/* [charset(UTF8)] */
+ struct dom_sid *sid;/* [unique] */
+}/* [public,flag(LIBNDR_PRINT_ARRAY_HEX)] */;
+
#endif /* _HEADER_schannel */