summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2010-06-22 12:42:52 +0200
committerMichael Adam <obnox@samba.org>2010-08-14 02:10:55 +0200
commit2916b302f35e434a1f9dfe329a146cb815bcda7e (patch)
tree00478d71e78933f05f2b2daee0079d2d586b3178 /source3
parentac63c50684ec2edb4a99f6ed1995288700ce5642 (diff)
downloadsamba-2916b302f35e434a1f9dfe329a146cb815bcda7e.tar.gz
samba-2916b302f35e434a1f9dfe329a146cb815bcda7e.tar.bz2
samba-2916b302f35e434a1f9dfe329a146cb815bcda7e.zip
s3:idmap_rid: remove range from idmap_rid_context()
Now, the idmap_domain range that is centrally parsed is used.
Diffstat (limited to 'source3')
-rw-r--r--source3/winbindd/idmap_rid.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/source3/winbindd/idmap_rid.c b/source3/winbindd/idmap_rid.c
index 762d8890db..e4490ded16 100644
--- a/source3/winbindd/idmap_rid.c
+++ b/source3/winbindd/idmap_rid.c
@@ -26,8 +26,6 @@
struct idmap_rid_context {
const char *domain_name;
- uint32_t low_id;
- uint32_t high_id;
uint32_t base_rid;
};
@@ -42,11 +40,6 @@ static NTSTATUS idmap_rid_initialize(struct idmap_domain *dom,
NTSTATUS ret;
struct idmap_rid_context *ctx;
char *config_option = NULL;
- const char *range;
- uid_t low_uid = 0;
- uid_t high_uid = 0;
- gid_t low_gid = 0;
- gid_t high_gid = 0;
ctx = TALLOC_ZERO_P(dom, struct idmap_rid_context);
if (ctx == NULL) {
@@ -61,38 +54,6 @@ static NTSTATUS idmap_rid_initialize(struct idmap_domain *dom,
goto failed;
}
- range = lp_parm_const_string(-1, config_option, "range", NULL);
- if ( !range ||
- (sscanf(range, "%u - %u", &ctx->low_id, &ctx->high_id) != 2) ||
- (ctx->low_id > ctx->high_id))
- {
- ctx->low_id = 0;
- ctx->high_id = 0;
- }
-
- /* lets see if the range is defined by the old idmap uid/idmap gid */
- if (!ctx->low_id && !ctx->high_id) {
- if (lp_idmap_uid(&low_uid, &high_uid)) {
- ctx->low_id = low_uid;
- ctx->high_id = high_uid;
- }
-
- if (lp_idmap_gid(&low_gid, &high_gid)) {
- if ((ctx->low_id != low_gid) ||
- (ctx->high_id != high_uid)) {
- DEBUG(1, ("ERROR: idmap uid range must match idmap gid range\n"));
- ret = NT_STATUS_UNSUCCESSFUL;
- goto failed;
- }
- }
- }
-
- if (!ctx->low_id || !ctx->high_id) {
- DEBUG(1, ("ERROR: Invalid configuration, ID range missing or invalid\n"));
- ret = NT_STATUS_UNSUCCESSFUL;
- goto failed;
- }
-
ctx->base_rid = lp_parm_int(-1, config_option, "base_rid", 0);
ctx->domain_name = talloc_strdup( ctx, dom->name );