s3-net: Allow setting the ldap password for idmap_rfc2307
authorChristof Schmitt <christof.schmitt@us.ibm.com>
Thu, 21 Feb 2013 19:33:13 +0000 (12:33 -0700)
committerAndrew Bartlett <abartlet@samba.org>
Sat, 9 Mar 2013 05:30:22 +0000 (06:30 +0100)
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/utils/net_idmap.c

index bdc4879e889e09899e4c8c75370554e9e774f836..fbeca3eeaa07c898f4825e9d473bdf557562e802 100644 (file)
@@ -634,9 +634,11 @@ static int net_idmap_secret(struct net_context *c, int argc, const char **argv)
        backend = talloc_strdup(ctx, lp_parm_const_string(-1, opt, "backend", "tdb"));
        ALLOC_CHECK(backend);
 
-       if ( ( ! backend) || ( ! strequal(backend, "ldap"))) {
+       if ((!backend) || (!strequal(backend, "ldap") &&
+                          !strequal(backend, "rfc2307"))) {
                d_fprintf(stderr,
-                         _("The only currently supported backend is LDAP\n"));
+                         _("The only currently supported backend are LDAP "
+                           "and rfc2307\n"));
                talloc_free(ctx);
                return -1;
        }