summaryrefslogtreecommitdiff
path: root/source3/winbindd/winbindd_idmap.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-09-06 14:59:41 +0200
committerVolker Lendecke <vl@samba.org>2009-09-07 01:28:32 +0200
commit4ad330d5226901aed18656c49c70a3fc7a62826c (patch)
tree25acbaf40be3cbde44ed2ff27d99683f53888f0c /source3/winbindd/winbindd_idmap.c
parent7159060450e4d5cd3d71e6a5c7837dcd648a6220 (diff)
downloadsamba-4ad330d5226901aed18656c49c70a3fc7a62826c.tar.gz
samba-4ad330d5226901aed18656c49c70a3fc7a62826c.tar.bz2
samba-4ad330d5226901aed18656c49c70a3fc7a62826c.zip
s3:winbind: Convert WINBINDD_REMOVE_MAPPING to the new API
Diffstat (limited to 'source3/winbindd/winbindd_idmap.c')
-rw-r--r--source3/winbindd/winbindd_idmap.c63
1 files changed, 0 insertions, 63 deletions
diff --git a/source3/winbindd/winbindd_idmap.c b/source3/winbindd/winbindd_idmap.c
index a59907243f..423afe174d 100644
--- a/source3/winbindd/winbindd_idmap.c
+++ b/source3/winbindd/winbindd_idmap.c
@@ -45,65 +45,6 @@ struct winbindd_child *idmap_child(void)
return &static_idmap_child;
}
-static void winbindd_remove_mapping_recv(TALLOC_CTX *mem_ctx, bool success,
- struct winbindd_response *response,
- void *c, void *private_data)
-{
- void (*cont)(void *priv, bool succ) = (void (*)(void *, bool))c;
-
- if (!success) {
- DEBUG(5, ("Could not trigger idmap_remove_mapping\n"));
- cont(private_data, False);
- return;
- }
-
- if (response->result != WINBINDD_OK) {
- DEBUG(5, ("idmap_remove_mapping returned an error\n"));
- cont(private_data, False);
- return;
- }
-
- cont(private_data, True);
-}
-
-void winbindd_remove_mapping_async(TALLOC_CTX *mem_ctx,
- const struct id_map *map,
- void (*cont)(void *private_data, bool success),
- void *private_data)
-{
- struct winbindd_request request;
- ZERO_STRUCT(request);
- request.cmd = WINBINDD_DUAL_REMOVE_MAPPING;
- request.data.dual_idmapset.id = map->xid.id;
- request.data.dual_idmapset.type = map->xid.type;
- sid_to_fstring(request.data.dual_idmapset.sid, map->sid);
-
- do_async(mem_ctx, idmap_child(), &request, winbindd_remove_mapping_recv,
- (void *)cont, private_data);
-}
-
-enum winbindd_result winbindd_dual_remove_mapping(
- struct winbindd_domain *domain,
- struct winbindd_cli_state *state)
-{
- struct id_map map;
- DOM_SID sid;
- NTSTATUS result;
-
- DEBUG(3, ("[%5lu]: dual_idmapremove\n", (unsigned long)state->pid));
-
- if (!string_to_sid(&sid, state->request->data.dual_idmapset.sid))
- return WINBINDD_ERROR;
-
- map.sid = &sid;
- map.xid.id = state->request->data.dual_idmapset.id;
- map.xid.type = state->request->data.dual_idmapset.type;
- map.status = ID_MAPPED;
-
- result = idmap_remove_mapping(&map);
- return NT_STATUS_IS_OK(result) ? WINBINDD_OK : WINBINDD_ERROR;
-}
-
static void winbindd_set_hwm_recv(TALLOC_CTX *mem_ctx, bool success,
struct winbindd_response *response,
void *c, void *private_data)
@@ -479,10 +420,6 @@ static const struct winbindd_child_dispatch_table idmap_dispatch_table[] = {
.struct_cmd = WINBINDD_DUAL_GID2SID,
.struct_fn = winbindd_dual_gid2sid,
},{
- .name = "DUAL_REMOVE_MAPPING",
- .struct_cmd = WINBINDD_DUAL_REMOVE_MAPPING,
- .struct_fn = winbindd_dual_remove_mapping,
- },{
.name = "DUAL_SET_HWMS",
.struct_cmd = WINBINDD_DUAL_SET_HWM,
.struct_fn = winbindd_dual_set_hwm,