s3:net: remove alloc parameter from idmap_store_secret() (net idmap store).
authorMichael Adam <obnox@samba.org>
Tue, 7 Dec 2010 23:39:28 +0000 (00:39 +0100)
committerMichael Adam <obnox@samba.org>
Sun, 2 Jan 2011 11:51:55 +0000 (12:51 +0100)
source3/utils/net_idmap.c
source3/utils/net_proto.h

index 488132b515777b9d01015364f1abd3cd56ac822a..4bf6ecd0d68ba6a1d49ecb8303d53b5f211eb8c7 100644 (file)
@@ -289,7 +289,7 @@ static int net_idmap_set(struct net_context *c, int argc, const char **argv)
        d_printf("%s\n", _("Not implemented yet"));
        return -1;
 }
-bool idmap_store_secret(const char *backend, bool alloc,
+bool idmap_store_secret(const char *backend,
                        const char *domain, const char *identity,
                        const char *secret)
 {
@@ -297,11 +297,7 @@ bool idmap_store_secret(const char *backend, bool alloc,
        int r;
        bool ret;
 
-       if (alloc) {
-               r = asprintf(&tmp, "IDMAP_ALLOC_%s", backend);
-       } else {
-               r = asprintf(&tmp, "IDMAP_%s_%s", backend, domain);
-       }
+       r = asprintf(&tmp, "IDMAP_%s_%s", backend, domain);
 
        if (r < 0) return false;
 
@@ -363,7 +359,7 @@ static int net_idmap_secret(struct net_context *c, int argc, const char **argv)
                return -1;
        }
 
-       ret = idmap_store_secret("ldap", false, domain, dn, secret);
+       ret = idmap_store_secret("ldap", domain, dn, secret);
 
        if ( ! ret) {
                d_fprintf(stderr, _("Failed to store secret\n"));
index 9e9e82fb84700b1006fe2aae04254f5843d475af..99e0cbd7a4605378243f5aa1972d585ca60cfcd9 100644 (file)
@@ -86,7 +86,7 @@ int net_help(struct net_context *c, int argc, const char **argv);
 
 /* The following definitions come from utils/net_idmap.c  */
 
-bool idmap_store_secret(const char *backend, bool alloc,
+bool idmap_store_secret(const char *backend,
                        const char *domain, const char *identity,
                        const char *secret);
 int net_help_idmap(struct net_context *c, int argc, const char **argv);