summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-10-28 16:21:53 +0100
committerGünther Deschner <gd@samba.org>2009-10-29 10:49:35 +0100
commite92e33238c79a917db7af9b6dfbf06ebaaba9fd8 (patch)
treee7c97291f0f30c4a862f3c44e7799b69407d9f6d
parent83de5c826313aa09c76131ae70550bd81b3521c5 (diff)
downloadsamba-e92e33238c79a917db7af9b6dfbf06ebaaba9fd8.tar.gz
samba-e92e33238c79a917db7af9b6dfbf06ebaaba9fd8.tar.bz2
samba-e92e33238c79a917db7af9b6dfbf06ebaaba9fd8.zip
s3: add secrets.idl.
Guenther
-rw-r--r--source3/Makefile.in3
-rw-r--r--source3/librpc/gen_ndr/ndr_secrets.c79
-rw-r--r--source3/librpc/gen_ndr/ndr_secrets.h13
-rw-r--r--source3/librpc/gen_ndr/secrets.h19
-rw-r--r--source3/librpc/idl/secrets.idl27
5 files changed, 140 insertions, 1 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 6a150acd52..5aa5a8c2f0 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -1405,7 +1405,8 @@ samba3-idl::
@PIDL_OUTPUTDIR="librpc/gen_ndr" PIDL_ARGS="$(PIDL_ARGS)" CPP="$(CPP)" PIDL="../pidl/pidl" \
srcdir="$(srcdir)" $(srcdir)/script/build_idl.sh \
librpc/idl/messaging.idl librpc/idl/libnetapi.idl librpc/idl/notify.idl \
- librpc/idl/wbint.idl librpc/idl/perfcount.idl
+ librpc/idl/wbint.idl librpc/idl/perfcount.idl \
+ librpc/idl/secrets.idl
#####################################################################
diff --git a/source3/librpc/gen_ndr/ndr_secrets.c b/source3/librpc/gen_ndr/ndr_secrets.c
new file mode 100644
index 0000000000..f9b61454f6
--- /dev/null
+++ b/source3/librpc/gen_ndr/ndr_secrets.c
@@ -0,0 +1,79 @@
+/* parser auto-generated by pidl */
+
+#include "includes.h"
+#include "librpc/gen_ndr/ndr_secrets.h"
+
+_PUBLIC_ enum ndr_err_code ndr_push_TRUSTED_DOM_PASS(struct ndr_push *ndr, int ndr_flags, const struct TRUSTED_DOM_PASS *r)
+{
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m_term(r->uni_name)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->uni_name, 32, sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen(r->pass)));
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
+ NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->pass));
+ ndr->flags = _flags_save_string;
+ }
+ NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->mod_time));
+ NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->domain_sid));
+ NDR_CHECK(ndr_push_trailer_align(ndr, 4));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_push_dom_sid(ndr, NDR_BUFFERS, &r->domain_sid));
+ }
+ ndr->flags = _flags_save_STRUCT;
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_TRUSTED_DOM_PASS(struct ndr_pull *ndr, int ndr_flags, struct TRUSTED_DOM_PASS *r)
+{
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->uni_name_len));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->uni_name, 32, sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pass_len));
+ {
+ uint32_t _flags_save_string = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
+ NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->pass));
+ ndr->flags = _flags_save_string;
+ }
+ NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->mod_time));
+ NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->domain_sid));
+ NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_BUFFERS, &r->domain_sid));
+ }
+ ndr->flags = _flags_save_STRUCT;
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_TRUSTED_DOM_PASS(struct ndr_print *ndr, const char *name, const struct TRUSTED_DOM_PASS *r)
+{
+ ndr_print_struct(ndr, name, "TRUSTED_DOM_PASS");
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "uni_name_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term(r->uni_name):r->uni_name_len);
+ ndr_print_string(ndr, "uni_name", r->uni_name);
+ ndr_print_uint32(ndr, "pass_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen(r->pass):r->pass_len);
+ ndr_print_string(ndr, "pass", r->pass);
+ ndr_print_time_t(ndr, "mod_time", r->mod_time);
+ ndr_print_dom_sid(ndr, "domain_sid", &r->domain_sid);
+ ndr->depth--;
+ ndr->flags = _flags_save_STRUCT;
+ }
+}
+
diff --git a/source3/librpc/gen_ndr/ndr_secrets.h b/source3/librpc/gen_ndr/ndr_secrets.h
new file mode 100644
index 0000000000..eef5ef494e
--- /dev/null
+++ b/source3/librpc/gen_ndr/ndr_secrets.h
@@ -0,0 +1,13 @@
+/* header auto-generated by pidl */
+
+#include "librpc/ndr/libndr.h"
+#include "librpc/gen_ndr/secrets.h"
+
+#ifndef _HEADER_NDR_secrets
+#define _HEADER_NDR_secrets
+
+#define NDR_SECRETS_CALL_COUNT (0)
+enum ndr_err_code ndr_push_TRUSTED_DOM_PASS(struct ndr_push *ndr, int ndr_flags, const struct TRUSTED_DOM_PASS *r);
+enum ndr_err_code ndr_pull_TRUSTED_DOM_PASS(struct ndr_pull *ndr, int ndr_flags, struct TRUSTED_DOM_PASS *r);
+void ndr_print_TRUSTED_DOM_PASS(struct ndr_print *ndr, const char *name, const struct TRUSTED_DOM_PASS *r);
+#endif /* _HEADER_NDR_secrets */
diff --git a/source3/librpc/gen_ndr/secrets.h b/source3/librpc/gen_ndr/secrets.h
new file mode 100644
index 0000000000..c37a48c717
--- /dev/null
+++ b/source3/librpc/gen_ndr/secrets.h
@@ -0,0 +1,19 @@
+/* header auto-generated by pidl */
+
+#include <stdint.h>
+
+#include "libcli/util/ntstatus.h"
+
+#ifndef _HEADER_secrets
+#define _HEADER_secrets
+
+struct TRUSTED_DOM_PASS {
+ uint32_t uni_name_len;/* [value(strlen_m_term(uni_name))] */
+ const char *uni_name;/* [charset(UTF16)] */
+ uint32_t pass_len;/* [value(strlen(pass))] */
+ const char * pass;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
+ time_t mod_time;
+ struct dom_sid domain_sid;
+}/* [public,flag(LIBNDR_FLAG_NOALIGN)] */;
+
+#endif /* _HEADER_secrets */
diff --git a/source3/librpc/idl/secrets.idl b/source3/librpc/idl/secrets.idl
new file mode 100644
index 0000000000..929c9bc396
--- /dev/null
+++ b/source3/librpc/idl/secrets.idl
@@ -0,0 +1,27 @@
+#include "idl_types.h"
+
+/*
+ IDL structures for secrets code
+*/
+
+[
+ pointer_default(unique)
+]
+ interface secrets
+{
+
+ /*
+ * s3 on-disc storage structure for trusted domains, do not change !
+ */
+
+ typedef [flag(NDR_NOALIGN),public] struct {
+ [value(strlen_m_term(uni_name))] uint32 uni_name_len;
+ [charset(UTF16)] uint16 uni_name[32]; /* unicode domain name */
+ [value(strlen(pass))] uint32 pass_len;
+ astring pass; /* trust relationship's password */
+ time_t mod_time;
+ dom_sid domain_sid; /* remote domain's sid */
+ } TRUSTED_DOM_PASS;
+
+}
+