summaryrefslogtreecommitdiff
path: root/source3/winbindd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/winbindd')
-rw-r--r--source3/winbindd/winbindd.c2
-rw-r--r--source3/winbindd/winbindd_dual_srv.c23
-rw-r--r--source3/winbindd/winbindd_proto.h7
-rw-r--r--source3/winbindd/winbindd_remove_mapping.c106
4 files changed, 0 insertions, 138 deletions
diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c
index 673addd339..3a9643d729 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_REMOVE_MAPPING, "SET_MAPPING",
- winbindd_remove_mapping_send, winbindd_remove_mapping_recv },
{ WINBINDD_CHANGE_MACHACC, "CHANGE_MACHACC",
winbindd_change_machine_acct_send, winbindd_change_machine_acct_recv },
{ WINBINDD_PAM_AUTH_CRAP, "PAM_AUTH_CRAP",
diff --git a/source3/winbindd/winbindd_dual_srv.c b/source3/winbindd/winbindd_dual_srv.c
index 85467d09d7..706b691da8 100644
--- a/source3/winbindd/winbindd_dual_srv.c
+++ b/source3/winbindd/winbindd_dual_srv.c
@@ -562,26 +562,3 @@ NTSTATUS _wbint_PingDc(struct pipes_struct *p, struct wbint_PingDc *r)
DEBUG(5, ("winbindd_dual_ping_dc succeeded\n"));
return NT_STATUS_OK;
}
-
-NTSTATUS _wbint_RemoveMapping(struct pipes_struct *p,
- struct wbint_RemoveMapping *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_remove_mapping(&map);
-}
diff --git a/source3/winbindd/winbindd_proto.h b/source3/winbindd/winbindd_proto.h
index b90c90a646..746328856e 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_remove_mapping_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct winbindd_cli_state *cli,
- struct winbindd_request *request);
-NTSTATUS winbindd_remove_mapping_recv(struct tevent_req *req,
- struct winbindd_response *response);
-
struct tevent_req *winbindd_pam_auth_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct winbindd_cli_state *cli,
diff --git a/source3/winbindd/winbindd_remove_mapping.c b/source3/winbindd/winbindd_remove_mapping.c
deleted file mode 100644
index 1ca4e9452f..0000000000
--- a/source3/winbindd/winbindd_remove_mapping.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- Unix SMB/CIFS implementation.
- async implementation of WINBINDD_REMOVE_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_remove_mapping_state {
- struct dom_sid sid;
-};
-
-static void winbindd_remove_mapping_done(struct tevent_req *subreq);
-
-struct tevent_req *winbindd_remove_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_remove_mapping_state *state;
- struct winbindd_child *child;
- enum wbint_IdType type;
-
- req = tevent_req_create(mem_ctx, &state,
- struct winbindd_remove_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_RemoveMapping_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_remove_mapping_done, req);
- return req;
-}
-
-static void winbindd_remove_mapping_done(struct tevent_req *subreq)
-{
- struct tevent_req *req = tevent_req_callback_data(
- subreq, struct tevent_req);
- struct winbindd_remove_mapping_state *state = tevent_req_data(
- req, struct winbindd_remove_mapping_state);
- NTSTATUS status, result;
-
- status = rpccli_wbint_RemoveMapping_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_remove_mapping_recv(struct tevent_req *req,
- struct winbindd_response *response)
-{
- return tevent_req_simple_recv_ntstatus(req);
-}