From bc1a5b7935defef610240e4d76e7ff170a612df6 Mon Sep 17 00:00:00 2001 From: Lars Müller Date: Mon, 16 Jan 2006 17:21:47 +0000 Subject: 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. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- source3/sam/idmap.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3') 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); } -- cgit