summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorLars Müller <lmuelle@samba.org>2006-01-16 17:21:47 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:06:09 -0500
commitbc1a5b7935defef610240e4d76e7ff170a612df6 (patch)
tree0e107ed39d59f8ed7bf7a1ac7a4fe9c068385d54 /source3
parent2dd7fd8f69ea06ad234c3354493052ef5a147c03 (diff)
downloadsamba-bc1a5b7935defef610240e4d76e7ff170a612df6.tar.gz
samba-bc1a5b7935defef610240e4d76e7ff170a612df6.tar.bz2
samba-bc1a5b7935defef610240e4d76e7ff170a612df6.zip
r12964: Rewind rem_backend in the case we have to workaround the idmap_ prefix.
Else SAFE_FREE seg faults. Thanks to Günther for pointing me at this. I've implemented in in this was as we should announce to remove the idmap_ strip stuff after some time at all. (This used to be commit 6a5bf399a59b4f07a1560d534629cb14e20b5d3f)
Diffstat (limited to 'source3')
-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);
}