summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2009-01-22 14:29:15 +0100
committerMichael Adam <obnox@samba.org>2010-08-14 02:10:33 +0200
commit474020b1aeca8c527ea9aac6c39c6fb8386ace23 (patch)
tree35f6e6d85715c8de9a904a8c947dcdabcb6633fb
parent1ac8bf4ea8f28bf39990c42449eda07966bd5f81 (diff)
downloadsamba-474020b1aeca8c527ea9aac6c39c6fb8386ace23.tar.gz
samba-474020b1aeca8c527ea9aac6c39c6fb8386ace23.tar.bz2
samba-474020b1aeca8c527ea9aac6c39c6fb8386ace23.zip
s3:winbind: remove the method SET_MAPPING from winbind's API
Michael
-rw-r--r--nsswitch/winbind_struct_protocol.h2
-rw-r--r--source3/Makefile.in1
-rw-r--r--source3/librpc/idl/wbint.idl6
-rw-r--r--source3/winbindd/winbindd.c2
-rw-r--r--source3/winbindd/winbindd_dual_srv.c22
-rw-r--r--source3/winbindd/winbindd_proto.h7
-rw-r--r--source3/winbindd/winbindd_set_mapping.c106
7 files changed, 0 insertions, 146 deletions
diff --git a/nsswitch/winbind_struct_protocol.h b/nsswitch/winbind_struct_protocol.h
index 7554d5799a..2d6c8b326d 100644
--- a/nsswitch/winbind_struct_protocol.h
+++ b/nsswitch/winbind_struct_protocol.h
@@ -115,7 +115,6 @@ enum winbindd_cmd {
WINBINDD_ALLOCATE_UID,
WINBINDD_ALLOCATE_GID,
- WINBINDD_SET_MAPPING,
WINBINDD_REMOVE_MAPPING,
/* Miscellaneous other stuff */
@@ -166,7 +165,6 @@ enum winbindd_cmd {
WINBINDD_DUAL_SIDS2XIDS,
WINBINDD_DUAL_UID2SID,
WINBINDD_DUAL_GID2SID,
- WINBINDD_DUAL_SET_MAPPING,
WINBINDD_DUAL_REMOVE_MAPPING,
/* Wrapper around possibly blocking unix nss calls */
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 2d56e943b5..9c337ae39f 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -1300,7 +1300,6 @@ WINBINDD_OBJ1 = \
winbindd/winbindd_check_machine_acct.o \
winbindd/winbindd_change_machine_acct.o \
winbindd/winbindd_ping_dc.o \
- winbindd/winbindd_set_mapping.o \
winbindd/winbindd_remove_mapping.o \
winbindd/winbindd_pam_auth.o \
winbindd/winbindd_pam_auth_crap.o \
diff --git a/source3/librpc/idl/wbint.idl b/source3/librpc/idl/wbint.idl
index d1557f8955..62d0b4170f 100644
--- a/source3/librpc/idl/wbint.idl
+++ b/source3/librpc/idl/wbint.idl
@@ -160,12 +160,6 @@ interface wbint
WBINT_ID_TYPE_GID
} wbint_IdType;
- NTSTATUS wbint_SetMapping(
- [in] dom_sid *sid,
- [in] wbint_IdType type,
- [in] hyper id
- );
-
NTSTATUS wbint_RemoveMapping(
[in] dom_sid *sid,
[in] wbint_IdType type,
diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c
index 6221422f0c..673addd339 100644
--- a/source3/winbindd/winbindd.c
+++ b/source3/winbindd/winbindd.c
@@ -543,8 +543,6 @@ static struct winbindd_async_dispatch_table async_priv_table[] = {
winbindd_allocate_uid_send, winbindd_allocate_uid_recv },
{ WINBINDD_ALLOCATE_GID, "ALLOCATE_GID",
winbindd_allocate_gid_send, winbindd_allocate_gid_recv },
- { WINBINDD_SET_MAPPING, "SET_MAPPING",
- winbindd_set_mapping_send, winbindd_set_mapping_recv },
{ WINBINDD_REMOVE_MAPPING, "SET_MAPPING",
winbindd_remove_mapping_send, winbindd_remove_mapping_recv },
{ WINBINDD_CHANGE_MACHACC, "CHANGE_MACHACC",
diff --git a/source3/winbindd/winbindd_dual_srv.c b/source3/winbindd/winbindd_dual_srv.c
index 5a94e75511..85467d09d7 100644
--- a/source3/winbindd/winbindd_dual_srv.c
+++ b/source3/winbindd/winbindd_dual_srv.c
@@ -563,28 +563,6 @@ NTSTATUS _wbint_PingDc(struct pipes_struct *p, struct wbint_PingDc *r)
return NT_STATUS_OK;
}
-NTSTATUS _wbint_SetMapping(struct pipes_struct *p, struct wbint_SetMapping *r)
-{
- struct id_map map;
-
- map.sid = r->in.sid;
- map.xid.id = r->in.id;
- map.status = ID_MAPPED;
-
- switch (r->in.type) {
- case WBINT_ID_TYPE_UID:
- map.xid.type = ID_TYPE_UID;
- break;
- case WBINT_ID_TYPE_GID:
- map.xid.type = ID_TYPE_GID;
- break;
- default:
- return NT_STATUS_INVALID_PARAMETER;
- }
-
- return idmap_set_mapping(&map);
-}
-
NTSTATUS _wbint_RemoveMapping(struct pipes_struct *p,
struct wbint_RemoveMapping *r)
{
diff --git a/source3/winbindd/winbindd_proto.h b/source3/winbindd/winbindd_proto.h
index 8ce31d7e2a..b90c90a646 100644
--- a/source3/winbindd/winbindd_proto.h
+++ b/source3/winbindd/winbindd_proto.h
@@ -816,13 +816,6 @@ struct tevent_req *winbindd_change_machine_acct_send(TALLOC_CTX *mem_ctx,
NTSTATUS winbindd_change_machine_acct_recv(struct tevent_req *req,
struct winbindd_response *presp);
-struct tevent_req *winbindd_set_mapping_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct winbindd_cli_state *cli,
- struct winbindd_request *request);
-NTSTATUS winbindd_set_mapping_recv(struct tevent_req *req,
- struct winbindd_response *response);
-
struct tevent_req *winbindd_remove_mapping_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct winbindd_cli_state *cli,
diff --git a/source3/winbindd/winbindd_set_mapping.c b/source3/winbindd/winbindd_set_mapping.c
deleted file mode 100644
index 7ca564a559..0000000000
--- a/source3/winbindd/winbindd_set_mapping.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- Unix SMB/CIFS implementation.
- async implementation of WINBINDD_SET_MAPPING
- Copyright (C) Volker Lendecke 2009
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "includes.h"
-#include "winbindd.h"
-#include "librpc/gen_ndr/cli_wbint.h"
-
-struct winbindd_set_mapping_state {
- struct dom_sid sid;
-};
-
-static void winbindd_set_mapping_done(struct tevent_req *subreq);
-
-struct tevent_req *winbindd_set_mapping_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct winbindd_cli_state *cli,
- struct winbindd_request *request)
-{
- struct tevent_req *req, *subreq;
- struct winbindd_set_mapping_state *state;
- struct winbindd_child *child;
- enum wbint_IdType type;
-
- req = tevent_req_create(mem_ctx, &state,
- struct winbindd_set_mapping_state);
- if (req == NULL) {
- return NULL;
- }
-
- /* Ensure null termination */
- request->data.dual_idmapset.sid[
- sizeof(request->data.dual_idmapset.sid)-1]='\0';
-
- DEBUG(3, ("set_mapping %s\n", request->data.dual_idmapset.sid));
-
- if (!string_to_sid(&state->sid, request->data.dual_idmapset.sid)) {
- DEBUG(5, ("%s not a SID\n", request->data.dual_idmapset.sid));
- tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
- return tevent_req_post(req, ev);
- }
-
- switch (request->data.dual_idmapset.type) {
- case ID_TYPE_UID:
- type = WBINT_ID_TYPE_UID;
- break;
- case ID_TYPE_GID:
- type = WBINT_ID_TYPE_GID;
- break;
- default:
- tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
- return tevent_req_post(req, ev);
- }
-
- child = idmap_child();
-
- subreq = rpccli_wbint_SetMapping_send(state, ev, child->rpccli,
- &state->sid, type,
- request->data.dual_idmapset.id);
- if (tevent_req_nomem(subreq, req)) {
- return tevent_req_post(req, ev);
- }
- tevent_req_set_callback(subreq, winbindd_set_mapping_done, req);
- return req;
-}
-
-static void winbindd_set_mapping_done(struct tevent_req *subreq)
-{
- struct tevent_req *req = tevent_req_callback_data(
- subreq, struct tevent_req);
- struct winbindd_set_mapping_state *state = tevent_req_data(
- req, struct winbindd_set_mapping_state);
- NTSTATUS status, result;
-
- status = rpccli_wbint_SetMapping_recv(subreq, state, &result);
- if (!NT_STATUS_IS_OK(status)) {
- tevent_req_nterror(req, status);
- return;
- }
- if (!NT_STATUS_IS_OK(result)) {
- tevent_req_nterror(req, result);
- return;
- }
- tevent_req_done(req);
-}
-
-NTSTATUS winbindd_set_mapping_recv(struct tevent_req *req,
- struct winbindd_response *response)
-{
- return tevent_req_simple_recv_ntstatus(req);
-}