summaryrefslogtreecommitdiff
path: root/source3/sam/idmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/sam/idmap.c')
-rw-r--r--source3/sam/idmap.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/sam/idmap.c b/source3/sam/idmap.c
index 900f25f9c1..9fc1a573a9 100644
--- a/source3/sam/idmap.c
+++ b/source3/sam/idmap.c
@@ -120,6 +120,7 @@ BOOL idmap_init(const char **remote_backend)
char *rem_backend = smb_xstrdup(*remote_backend);
fstring params = "";
char *pparams;
+ BOOL idmap_prefix_workaround = False;
/* get any mode parameters passed in */
@@ -132,6 +133,7 @@ BOOL idmap_init(const char **remote_backend)
/* strip any leading idmap_ prefix of */
if ( strncmp( rem_backend, "idmap_", 6) == 0 ) {
rem_backend += 6;
+ idmap_prefix_workaround = True;
DEBUG(0, ("idmap_init: idmap backend uses deprecated 'idmap_' prefix. Please replace 'idmap_%s' by '%s' in %s\n", rem_backend, rem_backend, dyn_CONFIGFILE));
}
@@ -146,9 +148,13 @@ BOOL idmap_init(const char **remote_backend)
}
} else {
DEBUG(0, ("idmap_init: could not load remote backend '%s'\n", rem_backend));
+ if (idmap_prefix_workaround)
+ rem_backend -= 6;
SAFE_FREE(rem_backend);
return False;
}
+ if (idmap_prefix_workaround)
+ rem_backend -= 6;
SAFE_FREE(rem_backend);
}