summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2010-06-17 07:43:14 +0200
committerMichael Adam <obnox@samba.org>2010-08-14 02:10:47 +0200
commitdb3897258392eca17835a72d022364aa5b668c32 (patch)
tree545fe11d9295ca69452a11ade3d664fadb3dead4
parent3315f2cf9b6113ff84dde3a402f98c5c49f74bb9 (diff)
downloadsamba-db3897258392eca17835a72d022364aa5b668c32.tar.gz
samba-db3897258392eca17835a72d022364aa5b668c32.tar.bz2
samba-db3897258392eca17835a72d022364aa5b668c32.zip
s3:idmap_tdb: remove filter_low_id,filter_high_id from idmap_tdb_context
These are now taken from the idmap_domain struct.
-rw-r--r--source3/winbindd/idmap_tdb.c60
1 files changed, 3 insertions, 57 deletions
diff --git a/source3/winbindd/idmap_tdb.c b/source3/winbindd/idmap_tdb.c
index 5c0d256678..0b48247c3b 100644
--- a/source3/winbindd/idmap_tdb.c
+++ b/source3/winbindd/idmap_tdb.c
@@ -538,8 +538,6 @@ static NTSTATUS idmap_tdb_alloc_close(void)
struct idmap_tdb_context {
struct db_context *db;
- uint32_t filter_low_id;
- uint32_t filter_high_id;
};
/*****************************
@@ -559,64 +557,12 @@ static NTSTATUS idmap_tdb_db_init(struct idmap_domain *dom, const char *params)
return NT_STATUS_NO_MEMORY;
}
+ /* load backend specific configuration here: */
+#if 0
if (strequal(dom->name, "*")) {
- uid_t low_uid = 0;
- uid_t high_uid = 0;
- gid_t low_gid = 0;
- gid_t high_gid = 0;
-
- ctx->filter_low_id = 0;
- ctx->filter_high_id = 0;
-
- if (lp_idmap_uid(&low_uid, &high_uid)) {
- ctx->filter_low_id = low_uid;
- ctx->filter_high_id = high_uid;
- } else {
- DEBUG(3, ("Warning: 'idmap uid' not set!\n"));
- }
-
- if (lp_idmap_gid(&low_gid, &high_gid)) {
- if ((low_gid != low_uid) || (high_gid != high_uid)) {
- DEBUG(1, ("Warning: 'idmap uid' and 'idmap gid'"
- " ranges do not agree -- building "
- "intersection\n"));
- ctx->filter_low_id = MAX(ctx->filter_low_id,
- low_gid);
- ctx->filter_high_id = MIN(ctx->filter_high_id,
- high_gid);
- }
- } else {
- DEBUG(3, ("Warning: 'idmap gid' not set!\n"));
- }
} else {
- char *config_option = NULL;
- const char *range;
-
- config_option = talloc_asprintf(ctx, "idmap config %s", dom->name);
- if ( ! config_option) {
- DEBUG(0, ("Out of memory!\n"));
- ret = NT_STATUS_NO_MEMORY;
- goto failed;
- }
-
- range = lp_parm_const_string(-1, config_option, "range", NULL);
- if (( ! range) ||
- (sscanf(range, "%u - %u", &ctx->filter_low_id, &ctx->filter_high_id) != 2))
- {
- ctx->filter_low_id = 0;
- ctx->filter_high_id = 0;
- }
-
- talloc_free(config_option);
}
-
- if (ctx->filter_low_id > ctx->filter_high_id) {
- ctx->filter_low_id = 0;
- ctx->filter_high_id = 0;
- }
-
- DEBUG(10, ("idmap_tdb_db_init: filter range %u-%u loaded for domain "
- "'%s'\n", ctx->filter_low_id, ctx->filter_high_id, dom->name));
+#endif
ret = idmap_tdb_open_db(ctx, false, &ctx->db);
if ( ! NT_STATUS_IS_OK(ret)) {