r12936: Fix bug #3264.
authorLars Müller <lmuelle@samba.org>
Sat, 14 Jan 2006 15:25:33 +0000 (15:25 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:06:08 +0000 (11:06 -0500)
If we detect a leading 'idmap_' for the idmap backend setting we strip
this and inform about the deprecated config with DEBUG 0.

I'm not sure if we should set a TTL of one year or five additional
releases from now for this code.

This is required for the changes Günther made as the first step to solve
bug #3264.  With this fix we can even run with an old config.  This is
very important as we else will break existing configurations with an
update.
(This used to be commit 34c7d8c0694369760340843318f873e26546cb2e)

source3/sam/idmap.c

index ec3ccb29859e480ac45df56bb5d65d0e7500e469..900f25f9c11db180643278479ae8b0bfaad7c764 100644 (file)
@@ -128,6 +128,12 @@ BOOL idmap_init(const char **remote_backend)
                        pparams++;
                        fstrcpy( params, pparams );
                }
+
+               /* strip any leading idmap_ prefix of */
+               if ( strncmp( rem_backend, "idmap_", 6) == 0 ) {
+                       rem_backend += 6;
+                       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));
+               }
                
                DEBUG(3, ("idmap_init: using '%s' as remote backend\n", rem_backend));