[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-836-g0a16265

Volker Lendecke vlendec at samba.org
Wed Aug 5 01:21:02 MDT 2009


The branch, master has been updated
       via  0a16265bc21e6f1f8cef4f38b7b45f3fd356527c (commit)
       via  01ea26bf28ab697af03c7ebc3a1261c240fe1360 (commit)
       via  fec380818ffdd7fba58e8dd591049c4b2428ab7d (commit)
       via  1dc1ac00512a28bdc025b00fbfa676b0f5b15751 (commit)
       via  718a26fd29036cc200cdc1c320733eafe84d2337 (commit)
       via  592822786d0a26bdf283ca4621c0df6f7f671869 (commit)
       via  ce42ea3ab8c69a3f650d4c9bc787e4805aad928d (commit)
       via  f09a95aaff4542df4225f3828a0d737497f0f2e8 (commit)
       via  ff3ce9016a43906df55a0922f0697c91d255de88 (commit)
       via  bd9d7f75e352985f1b0e0785f0ba94dea19d2601 (commit)
       via  5bbb7a0d143b34b6a2a2c4adb1114120cddd74bf (commit)
       via  9dc401a20ec608d4d8ae25fb4e81c462e9ced415 (commit)
       via  afc82444fd367e8b8541e4a41a86966a288ed2ef (commit)
       via  0418d38bc80dc8680834875629a3df8e1734b885 (commit)
       via  7077492778dbda30e5f865ae1d0ab0237e00f54f (commit)
       via  360227a0feb443fbbcc420295d5666da5823685a (commit)
       via  10685b37d4dc16dc75c48c08937f003af4968a0c (commit)
       via  292f3f896fa5bc381c88526fc73a6224b8d286f0 (commit)
       via  9b369ffcf0f113871b00de4229432a74fe436834 (commit)
       via  3eff8e93e283828afdb3413aec2dae5c01b101b3 (commit)
       via  5db561a608a11895d8a9a038a98a9fcc7c867d59 (commit)
       via  153ae58d7d37daffc7c5547ef9174baf64f9aaa7 (commit)
       via  fb7150f23b154fe53a91f3433ea33cf680d4fa93 (commit)
       via  ea286fed7adf93311b0ca14c3ff1e7bac74a0b9b (commit)
       via  9c6f4cd12a3e62165782e34226888648649a0fef (commit)
       via  a5416770776c0ade8518e8875d47097662b026a6 (commit)
       via  f6554611ab90aa113a7579ce3a9fef765c19d98c (commit)
       via  74b45ba46cbf58c1bf9ef89f5f88509065cd81d2 (commit)
       via  fa59f9720d56ffaf07c13376118c452a4162f3df (commit)
       via  bb359c780aee3fd7e1074db93a28c95590ae5d36 (commit)
       via  2d6589fb0243cb2b73615de1aaea38a3059c08ed (commit)
       via  6cf3db91499ebd245b08997a319edf36cfee3365 (commit)
      from  ddd13c6816e7d289406948fe2f68db1aba7669d3 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 0a16265bc21e6f1f8cef4f38b7b45f3fd356527c
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Aug 4 16:26:07 2009 -0400

    s3:winbind: Convert WINBINDD_GETGROUPS to the new API

commit 01ea26bf28ab697af03c7ebc3a1261c240fe1360
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Aug 4 16:22:42 2009 -0400

    s3:winbind: Add async wb_gettoken

commit fec380818ffdd7fba58e8dd591049c4b2428ab7d
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Aug 4 16:20:18 2009 -0400

    s3:winbind: Convert WINBINDD_GETUSERDOMGROUPS to the new API

commit 1dc1ac00512a28bdc025b00fbfa676b0f5b15751
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Aug 4 16:07:01 2009 -0400

    s3:winbind: Add async wb_lookupusergroups

commit 718a26fd29036cc200cdc1c320733eafe84d2337
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Aug 2 18:01:54 2009 +0200

    s3:winbind: Make wcache_lookup_usergroups externally visible

commit 592822786d0a26bdf283ca4621c0df6f7f671869
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Aug 4 15:58:45 2009 -0400

    s3:winbind: Convert WINBINDD_GETSIDALIASES to the new API

commit ce42ea3ab8c69a3f650d4c9bc787e4805aad928d
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Aug 4 15:54:05 2009 -0400

    s3:winbind: Add async wb_lookupuseraliases

commit f09a95aaff4542df4225f3828a0d737497f0f2e8
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Aug 2 17:17:27 2009 +0200

    s3:winbind: Make parse_sidlist take a const char *

commit ff3ce9016a43906df55a0922f0697c91d255de88
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Aug 2 16:52:19 2009 +0200

    s3:winbind: Make wcache_lookup_useraliases available publically

commit bd9d7f75e352985f1b0e0785f0ba94dea19d2601
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Aug 4 15:41:40 2009 -0400

    s3:winbind: Convert WINBINDD_GETPWUID to the new API

commit 5bbb7a0d143b34b6a2a2c4adb1114120cddd74bf
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Aug 4 15:37:54 2009 -0400

    s3:winbind: Convert WINBINDD_GETPWNAM to the new API

commit 9dc401a20ec608d4d8ae25fb4e81c462e9ced415
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Aug 4 15:35:24 2009 -0400

    s3:winbind: Convert WINBINDD_GETPWSID to the new API

commit afc82444fd367e8b8541e4a41a86966a288ed2ef
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Aug 4 15:32:11 2009 -0400

    s3:winbind: Add async wb_getpwsid

commit 0418d38bc80dc8680834875629a3df8e1734b885
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Aug 4 15:31:49 2009 -0400

    s3:winbind: Make fillup_pw_field publically available

commit 7077492778dbda30e5f865ae1d0ab0237e00f54f
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Aug 4 15:23:13 2009 -0400

    s3:winbind: Add async wb_queryuser

commit 360227a0feb443fbbcc420295d5666da5823685a
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Aug 1 10:20:13 2009 -0400

    s3:winbind: Make wcache_query_user externally visible

commit 10685b37d4dc16dc75c48c08937f003af4968a0c
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Aug 4 14:22:17 2009 -0400

    s3:winbind: Convert WINBINDD_GID_TO_SID the new API

commit 292f3f896fa5bc381c88526fc73a6224b8d286f0
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Aug 4 14:19:03 2009 -0400

    s3:winbind: Add async wb_gid2sid

commit 9b369ffcf0f113871b00de4229432a74fe436834
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Aug 4 14:07:44 2009 -0400

    s3:winbind: Convert WINBINDD_UID_TO_SID the new API

commit 3eff8e93e283828afdb3413aec2dae5c01b101b3
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Aug 4 13:52:39 2009 -0400

    s3:winbind: Add async wb_uid2sid

commit 5db561a608a11895d8a9a038a98a9fcc7c867d59
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Aug 4 13:42:22 2009 -0400

    s3:winbind: Convert WINBINDD_SID_TO_GID the new API

commit 153ae58d7d37daffc7c5547ef9174baf64f9aaa7
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Aug 4 13:38:52 2009 -0400

    s3:winbind: Add async wb_sid2gid

commit fb7150f23b154fe53a91f3433ea33cf680d4fa93
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Aug 4 13:33:56 2009 -0400

    s3:winbind: Convert WINBINDD_SID_TO_UID to the new API

commit ea286fed7adf93311b0ca14c3ff1e7bac74a0b9b
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Aug 4 13:28:59 2009 -0400

    s3:winbind: Add async wb_sid2uid

commit 9c6f4cd12a3e62165782e34226888648649a0fef
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Aug 4 07:29:03 2009 -0400

    s3:winbind: Convert WINBINDD_LOOKUPNAME to the new API

commit a5416770776c0ade8518e8875d47097662b026a6
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Aug 4 07:22:34 2009 -0400

    s3:winbind: Add async wb_lookupname

commit f6554611ab90aa113a7579ce3a9fef765c19d98c
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Aug 1 00:10:46 2009 +0200

    s3:winbind: Make wcache_name_to_sid visible externally

commit 74b45ba46cbf58c1bf9ef89f5f88509065cd81d2
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Aug 4 06:58:28 2009 -0400

    s3:winbind: Remove old version of WINBINDD_PING

commit fa59f9720d56ffaf07c13376118c452a4162f3df
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Aug 4 06:57:13 2009 -0400

    s3:winbind: Convert WINBINDD_LOOKUPSID to the new API

commit bb359c780aee3fd7e1074db93a28c95590ae5d36
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Aug 3 23:44:46 2009 +0200

    s3:winbind: Add async wb_lookupsid

commit 2d6589fb0243cb2b73615de1aaea38a3059c08ed
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Aug 1 12:16:11 2009 +0200

    s3:winbind: Make wcache_sid_to_name externally visible

commit 6cf3db91499ebd245b08997a319edf36cfee3365
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Jul 28 15:06:11 2009 -0400

    s3:winbind: Add NDR-based parent-child communication to winbind

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

Summary of changes:
 nsswitch/winbind_struct_protocol.h           |    3 +
 source3/Makefile.in                          |   31 +-
 source3/librpc/gen_ndr/cli_wbint.c           | 1647 ++++++++++++++++++++++++++
 source3/librpc/gen_ndr/cli_wbint.h           |  141 +++
 source3/librpc/gen_ndr/ndr_wbint.c           | 1405 ++++++++++++++++++++++
 source3/librpc/gen_ndr/ndr_wbint.h           |   54 +
 source3/librpc/gen_ndr/srv_wbint.c           | 1000 ++++++++++++++++
 source3/librpc/gen_ndr/srv_wbint.h           |   27 +
 source3/librpc/gen_ndr/wbint.h               |  169 +++
 source3/librpc/idl/wbint.idl                 |   91 ++
 source3/winbindd/wb_getpwsid.c               |  223 ++++
 source3/winbindd/wb_gettoken.c               |  218 ++++
 source3/winbindd/wb_gid2sid.c                |  119 ++
 source3/winbindd/wb_lookupname.c             |  104 ++
 source3/winbindd/wb_lookupsid.c              |  132 ++
 source3/winbindd/wb_lookupuseraliases.c      |  101 ++
 source3/winbindd/wb_lookupusergroups.c       |   99 ++
 source3/winbindd/wb_queryuser.c              |  121 ++
 source3/winbindd/wb_sid2gid.c                |  170 +++
 source3/winbindd/wb_sid2uid.c                |  168 +++
 source3/winbindd/wb_uid2sid.c                |  119 ++
 source3/winbindd/winbindd.c                  |   40 +-
 source3/winbindd/winbindd.h                  |    1 +
 source3/winbindd/winbindd_async.c            |   15 +-
 source3/winbindd/winbindd_cache.c            |  412 ++++---
 source3/winbindd/winbindd_domain.c           |    4 +
 source3/winbindd/winbindd_dual.c             |   13 +
 source3/winbindd/winbindd_dual_ndr.c         |  273 +++++
 source3/winbindd/winbindd_dual_srv.c         |  174 +++
 source3/winbindd/winbindd_getgroups.c        |  222 ++++
 source3/winbindd/winbindd_getpwnam.c         |  142 +++
 source3/winbindd/winbindd_getpwsid.c         |   92 ++
 source3/winbindd/winbindd_getpwuid.c         |  108 ++
 source3/winbindd/winbindd_getsidaliases.c    |  137 +++
 source3/winbindd/winbindd_getuserdomgroups.c |  121 ++
 source3/winbindd/winbindd_gid_to_sid.c       |   87 ++
 source3/winbindd/winbindd_group.c            |  224 ----
 source3/winbindd/winbindd_idmap.c            |    4 +
 source3/winbindd/winbindd_locator.c          |    4 +
 source3/winbindd/winbindd_lookupname.c       |  110 ++
 source3/winbindd/winbindd_lookupsid.c        |  101 ++
 source3/winbindd/winbindd_misc.c             |    6 -
 source3/winbindd/winbindd_proto.h            |  177 +++-
 source3/winbindd/winbindd_sid.c              |  440 -------
 source3/winbindd/winbindd_sid_to_gid.c       |   94 ++
 source3/winbindd/winbindd_sid_to_uid.c       |   94 ++
 source3/winbindd/winbindd_uid_to_sid.c       |   87 ++
 source3/winbindd/winbindd_user.c             |  382 +------
 48 files changed, 8465 insertions(+), 1241 deletions(-)
 create mode 100644 source3/librpc/gen_ndr/cli_wbint.c
 create mode 100644 source3/librpc/gen_ndr/cli_wbint.h
 create mode 100644 source3/librpc/gen_ndr/ndr_wbint.c
 create mode 100644 source3/librpc/gen_ndr/ndr_wbint.h
 create mode 100644 source3/librpc/gen_ndr/srv_wbint.c
 create mode 100644 source3/librpc/gen_ndr/srv_wbint.h
 create mode 100644 source3/librpc/gen_ndr/wbint.h
 create mode 100644 source3/librpc/idl/wbint.idl
 create mode 100644 source3/winbindd/wb_getpwsid.c
 create mode 100644 source3/winbindd/wb_gettoken.c
 create mode 100644 source3/winbindd/wb_gid2sid.c
 create mode 100644 source3/winbindd/wb_lookupname.c
 create mode 100644 source3/winbindd/wb_lookupsid.c
 create mode 100644 source3/winbindd/wb_lookupuseraliases.c
 create mode 100644 source3/winbindd/wb_lookupusergroups.c
 create mode 100644 source3/winbindd/wb_queryuser.c
 create mode 100644 source3/winbindd/wb_sid2gid.c
 create mode 100644 source3/winbindd/wb_sid2uid.c
 create mode 100644 source3/winbindd/wb_uid2sid.c
 create mode 100644 source3/winbindd/winbindd_dual_ndr.c
 create mode 100644 source3/winbindd/winbindd_dual_srv.c
 create mode 100644 source3/winbindd/winbindd_getgroups.c
 create mode 100644 source3/winbindd/winbindd_getpwnam.c
 create mode 100644 source3/winbindd/winbindd_getpwsid.c
 create mode 100644 source3/winbindd/winbindd_getpwuid.c
 create mode 100644 source3/winbindd/winbindd_getsidaliases.c
 create mode 100644 source3/winbindd/winbindd_getuserdomgroups.c
 create mode 100644 source3/winbindd/winbindd_gid_to_sid.c
 create mode 100644 source3/winbindd/winbindd_lookupname.c
 create mode 100644 source3/winbindd/winbindd_lookupsid.c
 create mode 100644 source3/winbindd/winbindd_sid_to_gid.c
 create mode 100644 source3/winbindd/winbindd_sid_to_uid.c
 create mode 100644 source3/winbindd/winbindd_uid_to_sid.c


Changeset truncated at 500 lines:

diff --git a/nsswitch/winbind_struct_protocol.h b/nsswitch/winbind_struct_protocol.h
index 1785c30..bd14410 100644
--- a/nsswitch/winbind_struct_protocol.h
+++ b/nsswitch/winbind_struct_protocol.h
@@ -169,6 +169,8 @@ enum winbindd_cmd {
 	WINBINDD_DUAL_USERINFO,
 	WINBINDD_DUAL_GETSIDALIASES,
 
+	WINBINDD_DUAL_NDRCMD,
+
 	/* Complete the challenge phase of the NTLM authentication
 	   protocol using cached password. */
 	WINBINDD_CCACHE_NTLMAUTH,
@@ -247,6 +249,7 @@ struct winbindd_request {
 		fstring groupname;   /* getgrnam */
 		uid_t uid;           /* getpwuid, uid_to_sid */
 		gid_t gid;           /* getgrgid, gid_to_sid */
+		uint32_t ndrcmd;
 		struct {
 			/* We deliberatedly don't split into domain/user to
                            avoid having the client know what the separator
diff --git a/source3/Makefile.in b/source3/Makefile.in
index ecfbcd0..650e208 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -1138,6 +1138,11 @@ WINBINDD_OBJ1 = \
 		winbindd/winbindd_ads.o   \
 		winbindd/winbindd_passdb.o \
 		winbindd/winbindd_dual.o  \
+		winbindd/winbindd_dual_ndr.o  \
+		winbindd/winbindd_dual_srv.o  \
+		librpc/gen_ndr/cli_wbint.o \
+		librpc/gen_ndr/srv_wbint.o \
+		librpc/gen_ndr/ndr_wbint.o \
 		winbindd/winbindd_async.o \
 		winbindd/winbindd_creds.o \
 		winbindd/winbindd_cred_cache.o \
@@ -1147,6 +1152,29 @@ WINBINDD_OBJ1 = \
 		winbindd/winbindd_locator.o \
 		winbindd/winbindd_ndr.o \
 		winbindd/wb_ping.o \
+		winbindd/wb_lookupsid.o \
+		winbindd/wb_lookupname.o \
+		winbindd/wb_sid2uid.o \
+		winbindd/wb_sid2gid.o \
+		winbindd/wb_uid2sid.o \
+		winbindd/wb_gid2sid.o \
+		winbindd/wb_queryuser.o \
+		winbindd/wb_lookupuseraliases.o \
+		winbindd/wb_lookupusergroups.o \
+		winbindd/wb_getpwsid.o \
+		winbindd/wb_gettoken.o \
+		winbindd/winbindd_lookupsid.o \
+		winbindd/winbindd_lookupname.o \
+		winbindd/winbindd_sid_to_uid.o \
+		winbindd/winbindd_sid_to_gid.o \
+		winbindd/winbindd_uid_to_sid.o \
+		winbindd/winbindd_gid_to_sid.o \
+		winbindd/winbindd_getpwsid.o \
+		winbindd/winbindd_getpwnam.o \
+		winbindd/winbindd_getpwuid.o \
+		winbindd/winbindd_getsidaliases.o \
+		winbindd/winbindd_getuserdomgroups.o \
+		winbindd/winbindd_getgroups.o \
 		auth/token_util.o \
 		../nsswitch/libwbclient/wb_reqtrans.o \
 		smbd/connection.o
@@ -1322,7 +1350,8 @@ samba3-idl::
 	 srcdir="$(srcdir)" ../librpc/build_idl.sh ../librpc/idl/*.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/messaging.idl librpc/idl/libnetapi.idl librpc/idl/notify.idl \
+		librpc/idl/wbint.idl
 
 #####################################################################
 
diff --git a/source3/librpc/gen_ndr/cli_wbint.c b/source3/librpc/gen_ndr/cli_wbint.c
new file mode 100644
index 0000000..de6b345
--- /dev/null
+++ b/source3/librpc/gen_ndr/cli_wbint.c
@@ -0,0 +1,1647 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * client auto-generated by pidl. DO NOT MODIFY!
+ */
+
+#include "includes.h"
+#include "librpc/gen_ndr/cli_wbint.h"
+
+struct rpccli_wbint_Ping_state {
+	struct wbint_Ping orig;
+	struct wbint_Ping tmp;
+	TALLOC_CTX *out_mem_ctx;
+	NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+};
+
+static void rpccli_wbint_Ping_done(struct tevent_req *subreq);
+
+struct tevent_req *rpccli_wbint_Ping_send(TALLOC_CTX *mem_ctx,
+					  struct tevent_context *ev,
+					  struct rpc_pipe_client *cli,
+					  uint32_t _in_data /* [in]  */,
+					  uint32_t *_out_data /* [out] [ref] */)
+{
+	struct tevent_req *req;
+	struct rpccli_wbint_Ping_state *state;
+	struct tevent_req *subreq;
+
+	req = tevent_req_create(mem_ctx, &state,
+				struct rpccli_wbint_Ping_state);
+	if (req == NULL) {
+		return NULL;
+	}
+	state->out_mem_ctx = NULL;
+	state->dispatch_recv = cli->dispatch_recv;
+
+	/* In parameters */
+	state->orig.in.in_data = _in_data;
+
+	/* Out parameters */
+	state->orig.out.out_data = _out_data;
+
+	if (DEBUGLEVEL >= 10) {
+		NDR_PRINT_IN_DEBUG(wbint_Ping, &state->orig);
+	}
+
+	state->out_mem_ctx = talloc_named_const(state, 0,
+			     "rpccli_wbint_Ping_out_memory");
+	if (tevent_req_nomem(state->out_mem_ctx, req)) {
+		return tevent_req_post(req, ev);
+	}
+
+	/* make a temporary copy, that we pass to the dispatch function */
+	state->tmp = state->orig;
+
+	subreq = cli->dispatch_send(state, ev, cli,
+				    &ndr_table_wbint,
+				    NDR_WBINT_PING,
+				    &state->tmp);
+	if (tevent_req_nomem(subreq, req)) {
+		return tevent_req_post(req, ev);
+	}
+	tevent_req_set_callback(subreq, rpccli_wbint_Ping_done, req);
+	return req;
+}
+
+static void rpccli_wbint_Ping_done(struct tevent_req *subreq)
+{
+	struct tevent_req *req = tevent_req_callback_data(
+		subreq, struct tevent_req);
+	struct rpccli_wbint_Ping_state *state = tevent_req_data(
+		req, struct rpccli_wbint_Ping_state);
+	NTSTATUS status;
+	TALLOC_CTX *mem_ctx;
+
+	if (state->out_mem_ctx) {
+		mem_ctx = state->out_mem_ctx;
+	} else {
+		mem_ctx = state;
+	}
+
+	status = state->dispatch_recv(subreq, mem_ctx);
+	TALLOC_FREE(subreq);
+	if (!NT_STATUS_IS_OK(status)) {
+		tevent_req_nterror(req, status);
+		return;
+	}
+
+	/* Copy out parameters */
+	*state->orig.out.out_data = *state->tmp.out.out_data;
+
+	/* Reset temporary structure */
+	ZERO_STRUCT(state->tmp);
+
+	if (DEBUGLEVEL >= 10) {
+		NDR_PRINT_OUT_DEBUG(wbint_Ping, &state->orig);
+	}
+
+	tevent_req_done(req);
+}
+
+NTSTATUS rpccli_wbint_Ping_recv(struct tevent_req *req,
+				TALLOC_CTX *mem_ctx)
+{
+	struct rpccli_wbint_Ping_state *state = tevent_req_data(
+		req, struct rpccli_wbint_Ping_state);
+	NTSTATUS status;
+
+	if (tevent_req_is_nterror(req, &status)) {
+		tevent_req_received(req);
+		return status;
+	}
+
+	/* Steal possbile out parameters to the callers context */
+	talloc_steal(mem_ctx, state->out_mem_ctx);
+
+	tevent_req_received(req);
+	return NT_STATUS_OK;
+}
+
+NTSTATUS rpccli_wbint_Ping(struct rpc_pipe_client *cli,
+			   TALLOC_CTX *mem_ctx,
+			   uint32_t in_data /* [in]  */,
+			   uint32_t *out_data /* [out] [ref] */)
+{
+	struct wbint_Ping r;
+	NTSTATUS status;
+
+	/* In parameters */
+	r.in.in_data = in_data;
+
+	if (DEBUGLEVEL >= 10) {
+		NDR_PRINT_IN_DEBUG(wbint_Ping, &r);
+	}
+
+	status = cli->dispatch(cli,
+				mem_ctx,
+				&ndr_table_wbint,
+				NDR_WBINT_PING,
+				&r);
+
+	if (!NT_STATUS_IS_OK(status)) {
+		return status;
+	}
+
+	if (DEBUGLEVEL >= 10) {
+		NDR_PRINT_OUT_DEBUG(wbint_Ping, &r);
+	}
+
+	if (NT_STATUS_IS_ERR(status)) {
+		return status;
+	}
+
+	/* Return variables */
+	*out_data = *r.out.out_data;
+
+	/* Return result */
+	return NT_STATUS_OK;
+}
+
+struct rpccli_wbint_LookupSid_state {
+	struct wbint_LookupSid orig;
+	struct wbint_LookupSid tmp;
+	TALLOC_CTX *out_mem_ctx;
+	NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+};
+
+static void rpccli_wbint_LookupSid_done(struct tevent_req *subreq);
+
+struct tevent_req *rpccli_wbint_LookupSid_send(TALLOC_CTX *mem_ctx,
+					       struct tevent_context *ev,
+					       struct rpc_pipe_client *cli,
+					       struct dom_sid *_sid /* [in] [ref] */,
+					       enum lsa_SidType *_type /* [out] [ref] */,
+					       const char **_domain /* [out] [ref,charset(UTF8)] */,
+					       const char **_name /* [out] [ref,charset(UTF8)] */)
+{
+	struct tevent_req *req;
+	struct rpccli_wbint_LookupSid_state *state;
+	struct tevent_req *subreq;
+
+	req = tevent_req_create(mem_ctx, &state,
+				struct rpccli_wbint_LookupSid_state);
+	if (req == NULL) {
+		return NULL;
+	}
+	state->out_mem_ctx = NULL;
+	state->dispatch_recv = cli->dispatch_recv;
+
+	/* In parameters */
+	state->orig.in.sid = _sid;
+
+	/* Out parameters */
+	state->orig.out.type = _type;
+	state->orig.out.domain = _domain;
+	state->orig.out.name = _name;
+
+	/* Result */
+	ZERO_STRUCT(state->orig.out.result);
+
+	if (DEBUGLEVEL >= 10) {
+		NDR_PRINT_IN_DEBUG(wbint_LookupSid, &state->orig);
+	}
+
+	state->out_mem_ctx = talloc_named_const(state, 0,
+			     "rpccli_wbint_LookupSid_out_memory");
+	if (tevent_req_nomem(state->out_mem_ctx, req)) {
+		return tevent_req_post(req, ev);
+	}
+
+	/* make a temporary copy, that we pass to the dispatch function */
+	state->tmp = state->orig;
+
+	subreq = cli->dispatch_send(state, ev, cli,
+				    &ndr_table_wbint,
+				    NDR_WBINT_LOOKUPSID,
+				    &state->tmp);
+	if (tevent_req_nomem(subreq, req)) {
+		return tevent_req_post(req, ev);
+	}
+	tevent_req_set_callback(subreq, rpccli_wbint_LookupSid_done, req);
+	return req;
+}
+
+static void rpccli_wbint_LookupSid_done(struct tevent_req *subreq)
+{
+	struct tevent_req *req = tevent_req_callback_data(
+		subreq, struct tevent_req);
+	struct rpccli_wbint_LookupSid_state *state = tevent_req_data(
+		req, struct rpccli_wbint_LookupSid_state);
+	NTSTATUS status;
+	TALLOC_CTX *mem_ctx;
+
+	if (state->out_mem_ctx) {
+		mem_ctx = state->out_mem_ctx;
+	} else {
+		mem_ctx = state;
+	}
+
+	status = state->dispatch_recv(subreq, mem_ctx);
+	TALLOC_FREE(subreq);
+	if (!NT_STATUS_IS_OK(status)) {
+		tevent_req_nterror(req, status);
+		return;
+	}
+
+	/* Copy out parameters */
+	*state->orig.out.type = *state->tmp.out.type;
+	*state->orig.out.domain = *state->tmp.out.domain;
+	*state->orig.out.name = *state->tmp.out.name;
+
+	/* Copy result */
+	state->orig.out.result = state->tmp.out.result;
+
+	/* Reset temporary structure */
+	ZERO_STRUCT(state->tmp);
+
+	if (DEBUGLEVEL >= 10) {
+		NDR_PRINT_OUT_DEBUG(wbint_LookupSid, &state->orig);
+	}
+
+	tevent_req_done(req);
+}
+
+NTSTATUS rpccli_wbint_LookupSid_recv(struct tevent_req *req,
+				     TALLOC_CTX *mem_ctx,
+				     NTSTATUS *result)
+{
+	struct rpccli_wbint_LookupSid_state *state = tevent_req_data(
+		req, struct rpccli_wbint_LookupSid_state);
+	NTSTATUS status;
+
+	if (tevent_req_is_nterror(req, &status)) {
+		tevent_req_received(req);
+		return status;
+	}
+
+	/* Steal possbile out parameters to the callers context */
+	talloc_steal(mem_ctx, state->out_mem_ctx);
+
+	/* Return result */
+	*result = state->orig.out.result;
+
+	tevent_req_received(req);
+	return NT_STATUS_OK;
+}
+
+NTSTATUS rpccli_wbint_LookupSid(struct rpc_pipe_client *cli,
+				TALLOC_CTX *mem_ctx,
+				struct dom_sid *sid /* [in] [ref] */,
+				enum lsa_SidType *type /* [out] [ref] */,
+				const char **domain /* [out] [ref,charset(UTF8)] */,
+				const char **name /* [out] [ref,charset(UTF8)] */)
+{
+	struct wbint_LookupSid r;
+	NTSTATUS status;
+
+	/* In parameters */
+	r.in.sid = sid;
+
+	if (DEBUGLEVEL >= 10) {
+		NDR_PRINT_IN_DEBUG(wbint_LookupSid, &r);
+	}
+
+	status = cli->dispatch(cli,
+				mem_ctx,
+				&ndr_table_wbint,
+				NDR_WBINT_LOOKUPSID,
+				&r);
+
+	if (!NT_STATUS_IS_OK(status)) {
+		return status;
+	}
+
+	if (DEBUGLEVEL >= 10) {
+		NDR_PRINT_OUT_DEBUG(wbint_LookupSid, &r);
+	}
+
+	if (NT_STATUS_IS_ERR(status)) {
+		return status;
+	}
+
+	/* Return variables */
+	*type = *r.out.type;
+	*domain = *r.out.domain;
+	*name = *r.out.name;
+
+	/* Return result */
+	return r.out.result;
+}
+
+struct rpccli_wbint_LookupName_state {
+	struct wbint_LookupName orig;
+	struct wbint_LookupName tmp;
+	TALLOC_CTX *out_mem_ctx;
+	NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+};
+
+static void rpccli_wbint_LookupName_done(struct tevent_req *subreq);
+
+struct tevent_req *rpccli_wbint_LookupName_send(TALLOC_CTX *mem_ctx,
+						struct tevent_context *ev,
+						struct rpc_pipe_client *cli,
+						const char *_domain /* [in] [ref,charset(UTF8)] */,
+						const char *_name /* [in] [ref,charset(UTF8)] */,
+						uint32_t _flags /* [in]  */,
+						enum lsa_SidType *_type /* [out] [ref] */,
+						struct dom_sid *_sid /* [out] [ref] */)
+{
+	struct tevent_req *req;
+	struct rpccli_wbint_LookupName_state *state;
+	struct tevent_req *subreq;
+
+	req = tevent_req_create(mem_ctx, &state,
+				struct rpccli_wbint_LookupName_state);
+	if (req == NULL) {
+		return NULL;
+	}
+	state->out_mem_ctx = NULL;
+	state->dispatch_recv = cli->dispatch_recv;
+
+	/* In parameters */
+	state->orig.in.domain = _domain;
+	state->orig.in.name = _name;
+	state->orig.in.flags = _flags;
+
+	/* Out parameters */
+	state->orig.out.type = _type;
+	state->orig.out.sid = _sid;
+
+	/* Result */
+	ZERO_STRUCT(state->orig.out.result);
+
+	if (DEBUGLEVEL >= 10) {
+		NDR_PRINT_IN_DEBUG(wbint_LookupName, &state->orig);
+	}
+
+	state->out_mem_ctx = talloc_named_const(state, 0,
+			     "rpccli_wbint_LookupName_out_memory");
+	if (tevent_req_nomem(state->out_mem_ctx, req)) {
+		return tevent_req_post(req, ev);
+	}
+
+	/* make a temporary copy, that we pass to the dispatch function */
+	state->tmp = state->orig;
+
+	subreq = cli->dispatch_send(state, ev, cli,
+				    &ndr_table_wbint,
+				    NDR_WBINT_LOOKUPNAME,
+				    &state->tmp);
+	if (tevent_req_nomem(subreq, req)) {
+		return tevent_req_post(req, ev);
+	}
+	tevent_req_set_callback(subreq, rpccli_wbint_LookupName_done, req);
+	return req;
+}
+
+static void rpccli_wbint_LookupName_done(struct tevent_req *subreq)
+{
+	struct tevent_req *req = tevent_req_callback_data(
+		subreq, struct tevent_req);
+	struct rpccli_wbint_LookupName_state *state = tevent_req_data(
+		req, struct rpccli_wbint_LookupName_state);
+	NTSTATUS status;
+	TALLOC_CTX *mem_ctx;
+
+	if (state->out_mem_ctx) {
+		mem_ctx = state->out_mem_ctx;
+	} else {
+		mem_ctx = state;
+	}
+
+	status = state->dispatch_recv(subreq, mem_ctx);
+	TALLOC_FREE(subreq);
+	if (!NT_STATUS_IS_OK(status)) {
+		tevent_req_nterror(req, status);
+		return;
+	}


-- 
Samba Shared Repository


More information about the samba-cvs mailing list