s3:winbind: remove the method REMOVE_MAPPING from winbind's API
authorMichael Adam <obnox@samba.org>
Thu, 22 Jan 2009 13:34:50 +0000 (14:34 +0100)
committerMichael Adam <obnox@samba.org>
Sat, 14 Aug 2010 00:10:34 +0000 (02:10 +0200)
Michael

nsswitch/winbind_struct_protocol.h
source3/Makefile.in
source3/librpc/idl/wbint.idl
source3/winbindd/winbindd.c
source3/winbindd/winbindd_dual_srv.c
source3/winbindd/winbindd_proto.h
source3/winbindd/winbindd_remove_mapping.c [deleted file]

index 2d6c8b326dbbafe185fa5a22a053a189cc08489e..89f3f199eda7626161bbd926bb512a60c5fdbe11 100644 (file)
@@ -115,7 +115,6 @@ enum winbindd_cmd {
 
        WINBINDD_ALLOCATE_UID,
        WINBINDD_ALLOCATE_GID,
-       WINBINDD_REMOVE_MAPPING,
 
        /* Miscellaneous other stuff */
 
@@ -165,7 +164,6 @@ enum winbindd_cmd {
        WINBINDD_DUAL_SIDS2XIDS,
        WINBINDD_DUAL_UID2SID,
        WINBINDD_DUAL_GID2SID,
-       WINBINDD_DUAL_REMOVE_MAPPING,
 
        /* Wrapper around possibly blocking unix nss calls */
        WINBINDD_DUAL_USERINFO,
index 9c337ae39fe23e7e92ee0651e022968eace6c7be..5926d63f9920c7d63cf5d06852c8bd71e3ff2b54 100644 (file)
@@ -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_remove_mapping.o \
                winbindd/winbindd_pam_auth.o \
                winbindd/winbindd_pam_auth_crap.o \
                winbindd/winbindd_pam_chauthtok.o \
index 62d0b4170f3ee6f3f6c9ab2591ef119a208fb63e..4ac36930d3855c6c47e6cf6c9eddd13b5ea7df6a 100644 (file)
@@ -153,16 +153,4 @@ interface wbint
 
     NTSTATUS wbint_PingDc(
        );
-
-    typedef [public] enum {
-       WBINT_ID_TYPE_NOT_SPECIFIED,
-       WBINT_ID_TYPE_UID,
-       WBINT_ID_TYPE_GID
-    } wbint_IdType;
-
-    NTSTATUS wbint_RemoveMapping(
-       [in] dom_sid *sid,
-       [in] wbint_IdType type,
-       [in] hyper id
-       );
 }
index 673addd3398394751d643c417fa0a983232e8279..3a9643d7299dc02549840a65b6d683c1882db627 100644 (file)
@@ -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",
index 85467d09d7e9039c109718f60b9689f6353172c4..706b691da8bbbc6244e3d09223e3f7dbae62695b 100644 (file)
@@ -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);
-}
index b90c90a646c7e6eb0e7208febd03f5ae3a6e2d63..746328856e2f4d3ddf186b6cc78df55f217db081 100644 (file)
@@ -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 (file)
index 1ca4e94..0000000
+++ /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);
-}