summaryrefslogtreecommitdiff
path: root/source3/winbindd/idmap.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-12-12 09:51:56 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-12 10:07:05 +0100
commit38f8d32d10f7486ee570275aff185994697203f3 (patch)
tree08a996228dcb33ef51d574d30db44068ea89fa98 /source3/winbindd/idmap.c
parent3728c8b6d963756a24b0788344baeedfb4b9c2d7 (diff)
downloadsamba-38f8d32d10f7486ee570275aff185994697203f3.tar.gz
samba-38f8d32d10f7486ee570275aff185994697203f3.tar.bz2
samba-38f8d32d10f7486ee570275aff185994697203f3.zip
winbindd: remove unused WINBINDD_DUMP_MAPS support
Also the design of this function was really bad, instead do the dump into a file, the client should get back the list of mappings. metze (This used to be commit ce7fe8acf41e90553431c7cda6823700701835c7)
Diffstat (limited to 'source3/winbindd/idmap.c')
-rw-r--r--source3/winbindd/idmap.c67
1 files changed, 0 insertions, 67 deletions
diff --git a/source3/winbindd/idmap.c b/source3/winbindd/idmap.c
index e825ed9da7..6b4af10f6f 100644
--- a/source3/winbindd/idmap.c
+++ b/source3/winbindd/idmap.c
@@ -1486,73 +1486,6 @@ done:
return ret;
}
-/**************************************************************************
- Dump backend status.
-**************************************************************************/
-
-void idmap_dump_maps(const char *logfile)
-{
- NTSTATUS ret;
- struct unixid allid;
- struct id_map *maps;
- int num_maps;
- FILE *dump;
- int i;
-
- if (! NT_STATUS_IS_OK(ret = idmap_init())) {
- return;
- }
-
- dump = fopen(logfile, "w");
- if ( ! dump) {
- DEBUG(0, ("Unable to open open stream for file [%s], "
- "errno: %d\n", logfile, errno));
- return;
- }
-
- if (NT_STATUS_IS_OK(ret = idmap_alloc_init())) {
- allid.type = ID_TYPE_UID;
- allid.id = 0;
- idmap_alloc_ctx->methods->get_id_hwm(&allid);
- fprintf(dump, "USER HWM %lu\n", (unsigned long)allid.id);
-
- allid.type = ID_TYPE_GID;
- allid.id = 0;
- idmap_alloc_ctx->methods->get_id_hwm(&allid);
- fprintf(dump, "GROUP HWM %lu\n", (unsigned long)allid.id);
- }
-
- maps = talloc(idmap_ctx, struct id_map);
- num_maps = 0;
-
- for (i = 0; i < num_domains; i++) {
- if (idmap_domains[i]->methods->dump_data) {
- idmap_domains[i]->methods->dump_data(idmap_domains[i],
- &maps, &num_maps);
- }
- }
-
- for (i = 0; i < num_maps; i++) {
- switch (maps[i].xid.type) {
- case ID_TYPE_UID:
- fprintf(dump, "UID %lu %s\n",
- (unsigned long)maps[i].xid.id,
- sid_string_static(maps[i].sid));
- break;
- case ID_TYPE_GID:
- fprintf(dump, "GID %lu %s\n",
- (unsigned long)maps[i].xid.id,
- sid_string_static(maps[i].sid));
- break;
- case ID_TYPE_NOT_SPECIFIED:
- break;
- }
- }
-
- fflush(dump);
- fclose(dump);
-}
-
char *idmap_fetch_secret(const char *backend, bool alloc,
const char *domain, const char *identity)
{