summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2014-12-19 10:36:29 +0100
committerStefan Metzmacher <metze@samba.org>2015-07-08 18:38:22 +0200
commitee5e25b5b324b34929da98aeeb1c2b13d191d9d5 (patch)
tree47885931961f9f573b8a23adc143f03bc8812721
parentf9246d78f7fb4a4ec629ca525ccc97506ab6e483 (diff)
downloadsamba-ee5e25b5b324b34929da98aeeb1c2b13d191d9d5.tar.gz
librpc/idl: add winbind_LogonControl()
This will be used by the netr_LogonControl() in order to contact remote domains via winbindd. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
-rw-r--r--librpc/idl/netlogon.idl6
-rw-r--r--librpc/idl/winbind.idl13
-rw-r--r--source3/winbindd/winbindd_dual_srv.c13
-rw-r--r--source4/librpc/rpc/pyrpc.h3
4 files changed, 32 insertions, 3 deletions
diff --git a/librpc/idl/netlogon.idl b/librpc/idl/netlogon.idl
index b0ede39e79c..19daaf635d9 100644
--- a/librpc/idl/netlogon.idl
+++ b/librpc/idl/netlogon.idl
@@ -871,7 +871,7 @@ interface netlogon
[string,charset(UTF16)] uint16 *trusted_domain_name;
} netr_NETLOGON_INFO_4;
- typedef union {
+ typedef [public] union {
[case(1)] netr_NETLOGON_INFO_1 *info1;
[case(2)] netr_NETLOGON_INFO_2 *info2;
[case(3)] netr_NETLOGON_INFO_3 *info3;
@@ -880,7 +880,7 @@ interface netlogon
} netr_CONTROL_QUERY_INFORMATION;
/* function_code values */
- typedef [v1_enum] enum {
+ typedef [v1_enum,public] enum {
NETLOGON_CONTROL_QUERY = 0x00000001,
NETLOGON_CONTROL_REPLICATE = 0x00000002,
NETLOGON_CONTROL_SYNCHRONIZE = 0x00000003,
@@ -920,7 +920,7 @@ interface netlogon
/*****************/
/* Function 0x0E */
- typedef union {
+ typedef [public,switch_type(netr_LogonControlCode)] union {
[case(NETLOGON_CONTROL_REDISCOVER)] [string,charset(UTF16)] uint16 *domain;
[case(NETLOGON_CONTROL_TC_QUERY)] [string,charset(UTF16)] uint16 *domain;
[case(NETLOGON_CONTROL_TRANSPORT_NOTIFY)] [string,charset(UTF16)] uint16 *domain;
diff --git a/librpc/idl/winbind.idl b/librpc/idl/winbind.idl
index 39e89c3d814..92ac6ed4162 100644
--- a/librpc/idl/winbind.idl
+++ b/librpc/idl/winbind.idl
@@ -192,4 +192,17 @@ interface winbind
[in,out,ref] NL_DNS_NAME_INFO_ARRAY *dns_names
);
+ /*
+ * do a netr_LogonControl2Ex() against the right DC
+ */
+ typedef [v1_enum] enum netr_LogonControlCode netr_LogonControlCode;
+ typedef [switch_type(netr_LogonControlCode)] union netr_CONTROL_DATA_INFORMATION netr_CONTROL_DATA_INFORMATION;
+ typedef [switch_type(uint32)] union netr_CONTROL_QUERY_INFORMATION netr_CONTROL_QUERY_INFORMATION;
+
+ WERROR winbind_LogonControl(
+ [in] netr_LogonControlCode function_code,
+ [in] uint32 level,
+ [in,ref][switch_is(function_code)] netr_CONTROL_DATA_INFORMATION *data,
+ [out,ref][switch_is(level)] netr_CONTROL_QUERY_INFORMATION *query
+ );
}
diff --git a/source3/winbindd/winbindd_dual_srv.c b/source3/winbindd/winbindd_dual_srv.c
index 40919d72fea..efeafed9ea3 100644
--- a/source3/winbindd/winbindd_dual_srv.c
+++ b/source3/winbindd/winbindd_dual_srv.c
@@ -870,3 +870,16 @@ NTSTATUS _winbind_SamLogon(struct pipes_struct *p,
lm_response, nt_response, &r->out.validation.sam3);
return status;
}
+
+WERROR _winbind_LogonControl(struct pipes_struct *p,
+ struct winbind_LogonControl *r)
+{
+ struct winbindd_domain *domain;
+
+ domain = wb_child_domain();
+ if (domain == NULL) {
+ return WERR_NO_SUCH_DOMAIN;
+ }
+
+ return WERR_NOT_SUPPORTED;
+}
diff --git a/source4/librpc/rpc/pyrpc.h b/source4/librpc/rpc/pyrpc.h
index 290c9887bdd..32a58e39328 100644
--- a/source4/librpc/rpc/pyrpc.h
+++ b/source4/librpc/rpc/pyrpc.h
@@ -56,6 +56,9 @@ union netr_LogonLevel *py_export_netr_LogonLevel(TALLOC_CTX *mem_ctx, int level,
union netr_Validation;
PyObject *py_import_netr_Validation(TALLOC_CTX *mem_ctx, int level, union netr_Validation *in);
+union netr_CONTROL_DATA_INFORMATION *py_export_netr_CONTROL_DATA_INFORMATION(TALLOC_CTX *mem_ctx, int level, PyObject *in);
+union netr_CONTROL_QUERY_INFORMATION;
+PyObject *py_import_netr_CONTROL_QUERY_INFORMATION(TALLOC_CTX *mem_ctx, int level, union netr_CONTROL_QUERY_INFORMATION *in);
#ifndef NDR_DCERPC_REQUEST_OBJECT_PRESENT
#define NDR_DCERPC_REQUEST_OBJECT_PRESENT LIBNDR_FLAG_OBJECT_PRESENT