[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-1402-g04ea250
Volker Lendecke
vlendec at samba.org
Sun Sep 6 17:30:06 MDT 2009
The branch, master has been updated
via 04ea250aebe619d7ec25426be9d395f1dd635c90 (commit)
via 4ad330d5226901aed18656c49c70a3fc7a62826c (commit)
via 7159060450e4d5cd3d71e6a5c7837dcd648a6220 (commit)
via d9b7fd59b026fbad11263e8a018d654325ede0e4 (commit)
via 99f8dcab0c693424c65dce820a2eaed343c5f67e (commit)
from 03e84a22a85754958de931bda9806eef4c02ae61 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 04ea250aebe619d7ec25426be9d395f1dd635c90
Author: Volker Lendecke <vl at samba.org>
Date: Sun Sep 6 15:18:58 2009 +0200
s3:winbind: Convert WINBINDD_SET_HWM to the new API
commit 4ad330d5226901aed18656c49c70a3fc7a62826c
Author: Volker Lendecke <vl at samba.org>
Date: Sun Sep 6 14:59:41 2009 +0200
s3:winbind: Convert WINBINDD_REMOVE_MAPPING to the new API
commit 7159060450e4d5cd3d71e6a5c7837dcd648a6220
Author: Volker Lendecke <vl at samba.org>
Date: Sun Sep 6 14:47:06 2009 +0200
s3:winbind: Convert WINBINDD_SET_MAPPING to the new API
commit d9b7fd59b026fbad11263e8a018d654325ede0e4
Author: Volker Lendecke <vl at samba.org>
Date: Sun Sep 6 09:32:34 2009 +0200
s3:winbind: Convert WINBINDD_CHECK_MACHACC to the new API
commit 99f8dcab0c693424c65dce820a2eaed343c5f67e
Author: Volker Lendecke <vl at samba.org>
Date: Sat Sep 5 19:20:16 2009 +0200
s3:smbd: Add the ntstatus to the smb_panic in share_mode_lock_destructor
This might help finding why bug 6518 happens
-----------------------------------------------------------------------
Summary of changes:
source3/Makefile.in | 5 +-
source3/librpc/gen_ndr/cli_wbint.c | 616 ++++++++++++++++++++++++
source3/librpc/gen_ndr/cli_wbint.h | 48 ++
source3/librpc/gen_ndr/ndr_wbint.c | 274 +++++++++++-
source3/librpc/gen_ndr/ndr_wbint.h | 17 +-
source3/librpc/gen_ndr/srv_wbint.c | 322 ++++++++++++-
source3/librpc/gen_ndr/srv_wbint.h | 8 +
source3/librpc/gen_ndr/wbint.h | 64 +++
source3/librpc/idl/wbint.idl | 26 +
source3/locking/locking.c | 20 +-
source3/winbindd/winbindd.c | 15 +-
source3/winbindd/winbindd_check_machine_acct.c | 88 ++++
source3/winbindd/winbindd_domain.c | 4 -
source3/winbindd/winbindd_dual_srv.c | 119 +++++
source3/winbindd/winbindd_idmap.c | 187 -------
source3/winbindd/winbindd_misc.c | 68 ---
source3/winbindd/winbindd_proto.h | 27 +
source3/winbindd/winbindd_remove_mapping.c | 106 ++++
source3/winbindd/winbindd_set_hwm.c | 95 ++++
source3/winbindd/winbindd_set_mapping.c | 106 ++++
source3/winbindd/winbindd_sid.c | 142 ------
21 files changed, 1943 insertions(+), 414 deletions(-)
create mode 100644 source3/winbindd/winbindd_check_machine_acct.c
create mode 100644 source3/winbindd/winbindd_remove_mapping.c
create mode 100644 source3/winbindd/winbindd_set_hwm.c
create mode 100644 source3/winbindd/winbindd_set_mapping.c
delete mode 100644 source3/winbindd/winbindd_sid.c
Changeset truncated at 500 lines:
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 5e3e7eb..3528d6c 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -1141,7 +1141,6 @@ WINBINDD_OBJ1 = \
winbindd/winbindd_util.o \
winbindd/winbindd_cache.o \
winbindd/winbindd_pam.o \
- winbindd/winbindd_sid.o \
winbindd/winbindd_misc.o \
winbindd/winbindd_cm.o \
winbindd/winbindd_wins.o \
@@ -1213,6 +1212,10 @@ WINBINDD_OBJ1 = \
winbindd/winbindd_getdcname.o \
winbindd/winbindd_list_users.o \
winbindd/winbindd_list_groups.o \
+ winbindd/winbindd_check_machine_acct.o \
+ winbindd/winbindd_set_mapping.o \
+ winbindd/winbindd_remove_mapping.o \
+ winbindd/winbindd_set_hwm.o \
auth/token_util.o \
../nsswitch/libwbclient/wb_reqtrans.o \
smbd/connection.o
diff --git a/source3/librpc/gen_ndr/cli_wbint.c b/source3/librpc/gen_ndr/cli_wbint.c
index 6037b72..3e5fc44 100644
--- a/source3/librpc/gen_ndr/cli_wbint.c
+++ b/source3/librpc/gen_ndr/cli_wbint.c
@@ -2929,3 +2929,619 @@ NTSTATUS rpccli_wbint_LookupRids(struct rpc_pipe_client *cli,
return r.out.result;
}
+struct rpccli_wbint_CheckMachineAccount_state {
+ struct wbint_CheckMachineAccount orig;
+ struct wbint_CheckMachineAccount tmp;
+ TALLOC_CTX *out_mem_ctx;
+ NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+};
+
+static void rpccli_wbint_CheckMachineAccount_done(struct tevent_req *subreq);
+
+struct tevent_req *rpccli_wbint_CheckMachineAccount_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct rpc_pipe_client *cli)
+{
+ struct tevent_req *req;
+ struct rpccli_wbint_CheckMachineAccount_state *state;
+ struct tevent_req *subreq;
+
+ req = tevent_req_create(mem_ctx, &state,
+ struct rpccli_wbint_CheckMachineAccount_state);
+ if (req == NULL) {
+ return NULL;
+ }
+ state->out_mem_ctx = NULL;
+ state->dispatch_recv = cli->dispatch_recv;
+
+ /* In parameters */
+
+ /* Out parameters */
+
+ /* Result */
+ ZERO_STRUCT(state->orig.out.result);
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(wbint_CheckMachineAccount, &state->orig);
+ }
+
+ /* 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_CHECKMACHINEACCOUNT,
+ &state->tmp);
+ if (tevent_req_nomem(subreq, req)) {
+ return tevent_req_post(req, ev);
+ }
+ tevent_req_set_callback(subreq, rpccli_wbint_CheckMachineAccount_done, req);
+ return req;
+}
+
+static void rpccli_wbint_CheckMachineAccount_done(struct tevent_req *subreq)
+{
+ struct tevent_req *req = tevent_req_callback_data(
+ subreq, struct tevent_req);
+ struct rpccli_wbint_CheckMachineAccount_state *state = tevent_req_data(
+ req, struct rpccli_wbint_CheckMachineAccount_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 */
+
+ /* 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_CheckMachineAccount, &state->orig);
+ }
+
+ tevent_req_done(req);
+}
+
+NTSTATUS rpccli_wbint_CheckMachineAccount_recv(struct tevent_req *req,
+ TALLOC_CTX *mem_ctx,
+ NTSTATUS *result)
+{
+ struct rpccli_wbint_CheckMachineAccount_state *state = tevent_req_data(
+ req, struct rpccli_wbint_CheckMachineAccount_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_CheckMachineAccount(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx)
+{
+ struct wbint_CheckMachineAccount r;
+ NTSTATUS status;
+
+ /* In parameters */
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(wbint_CheckMachineAccount, &r);
+ }
+
+ status = cli->dispatch(cli,
+ mem_ctx,
+ &ndr_table_wbint,
+ NDR_WBINT_CHECKMACHINEACCOUNT,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(wbint_CheckMachineAccount, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return r.out.result;
+}
+
+struct rpccli_wbint_SetMapping_state {
+ struct wbint_SetMapping orig;
+ struct wbint_SetMapping tmp;
+ TALLOC_CTX *out_mem_ctx;
+ NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+};
+
+static void rpccli_wbint_SetMapping_done(struct tevent_req *subreq);
+
+struct tevent_req *rpccli_wbint_SetMapping_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct rpc_pipe_client *cli,
+ struct dom_sid *_sid /* [in] [ref] */,
+ enum wbint_IdType _type /* [in] */,
+ uint64_t _id /* [in] */)
+{
+ struct tevent_req *req;
+ struct rpccli_wbint_SetMapping_state *state;
+ struct tevent_req *subreq;
+
+ req = tevent_req_create(mem_ctx, &state,
+ struct rpccli_wbint_SetMapping_state);
+ if (req == NULL) {
+ return NULL;
+ }
+ state->out_mem_ctx = NULL;
+ state->dispatch_recv = cli->dispatch_recv;
+
+ /* In parameters */
+ state->orig.in.sid = _sid;
+ state->orig.in.type = _type;
+ state->orig.in.id = _id;
+
+ /* Out parameters */
+
+ /* Result */
+ ZERO_STRUCT(state->orig.out.result);
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(wbint_SetMapping, &state->orig);
+ }
+
+ /* 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_SETMAPPING,
+ &state->tmp);
+ if (tevent_req_nomem(subreq, req)) {
+ return tevent_req_post(req, ev);
+ }
+ tevent_req_set_callback(subreq, rpccli_wbint_SetMapping_done, req);
+ return req;
+}
+
+static void rpccli_wbint_SetMapping_done(struct tevent_req *subreq)
+{
+ struct tevent_req *req = tevent_req_callback_data(
+ subreq, struct tevent_req);
+ struct rpccli_wbint_SetMapping_state *state = tevent_req_data(
+ req, struct rpccli_wbint_SetMapping_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 */
+
+ /* 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_SetMapping, &state->orig);
+ }
+
+ tevent_req_done(req);
+}
+
+NTSTATUS rpccli_wbint_SetMapping_recv(struct tevent_req *req,
+ TALLOC_CTX *mem_ctx,
+ NTSTATUS *result)
+{
+ struct rpccli_wbint_SetMapping_state *state = tevent_req_data(
+ req, struct rpccli_wbint_SetMapping_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_SetMapping(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ struct dom_sid *sid /* [in] [ref] */,
+ enum wbint_IdType type /* [in] */,
+ uint64_t id /* [in] */)
+{
+ struct wbint_SetMapping r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.sid = sid;
+ r.in.type = type;
+ r.in.id = id;
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(wbint_SetMapping, &r);
+ }
+
+ status = cli->dispatch(cli,
+ mem_ctx,
+ &ndr_table_wbint,
+ NDR_WBINT_SETMAPPING,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(wbint_SetMapping, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return r.out.result;
+}
+
+struct rpccli_wbint_RemoveMapping_state {
+ struct wbint_RemoveMapping orig;
+ struct wbint_RemoveMapping tmp;
+ TALLOC_CTX *out_mem_ctx;
+ NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+};
+
+static void rpccli_wbint_RemoveMapping_done(struct tevent_req *subreq);
+
+struct tevent_req *rpccli_wbint_RemoveMapping_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct rpc_pipe_client *cli,
+ struct dom_sid *_sid /* [in] [ref] */,
+ enum wbint_IdType _type /* [in] */,
+ uint64_t _id /* [in] */)
+{
+ struct tevent_req *req;
+ struct rpccli_wbint_RemoveMapping_state *state;
+ struct tevent_req *subreq;
+
+ req = tevent_req_create(mem_ctx, &state,
+ struct rpccli_wbint_RemoveMapping_state);
+ if (req == NULL) {
+ return NULL;
+ }
+ state->out_mem_ctx = NULL;
+ state->dispatch_recv = cli->dispatch_recv;
+
+ /* In parameters */
+ state->orig.in.sid = _sid;
+ state->orig.in.type = _type;
+ state->orig.in.id = _id;
+
+ /* Out parameters */
+
+ /* Result */
+ ZERO_STRUCT(state->orig.out.result);
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(wbint_RemoveMapping, &state->orig);
+ }
+
+ /* 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_REMOVEMAPPING,
+ &state->tmp);
+ if (tevent_req_nomem(subreq, req)) {
+ return tevent_req_post(req, ev);
+ }
+ tevent_req_set_callback(subreq, rpccli_wbint_RemoveMapping_done, req);
+ return req;
+}
+
+static void rpccli_wbint_RemoveMapping_done(struct tevent_req *subreq)
+{
+ struct tevent_req *req = tevent_req_callback_data(
+ subreq, struct tevent_req);
+ struct rpccli_wbint_RemoveMapping_state *state = tevent_req_data(
+ req, struct rpccli_wbint_RemoveMapping_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 */
+
+ /* 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_RemoveMapping, &state->orig);
+ }
+
+ tevent_req_done(req);
+}
+
+NTSTATUS rpccli_wbint_RemoveMapping_recv(struct tevent_req *req,
+ TALLOC_CTX *mem_ctx,
+ NTSTATUS *result)
+{
+ struct rpccli_wbint_RemoveMapping_state *state = tevent_req_data(
+ req, struct rpccli_wbint_RemoveMapping_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_RemoveMapping(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ struct dom_sid *sid /* [in] [ref] */,
+ enum wbint_IdType type /* [in] */,
+ uint64_t id /* [in] */)
+{
+ struct wbint_RemoveMapping r;
+ NTSTATUS status;
+
+ /* In parameters */
+ r.in.sid = sid;
+ r.in.type = type;
+ r.in.id = id;
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(wbint_RemoveMapping, &r);
+ }
+
+ status = cli->dispatch(cli,
+ mem_ctx,
+ &ndr_table_wbint,
+ NDR_WBINT_REMOVEMAPPING,
+ &r);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(wbint_RemoveMapping, &r);
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+
+ /* Return variables */
+
+ /* Return result */
+ return r.out.result;
+}
+
+struct rpccli_wbint_SetHWM_state {
+ struct wbint_SetHWM orig;
+ struct wbint_SetHWM tmp;
+ TALLOC_CTX *out_mem_ctx;
+ NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+};
+
--
Samba Shared Repository
More information about the samba-cvs
mailing list