From 11016f2a6befc477c631c4f2ed8d9e7e4e250102 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Wed, 8 Dec 2010 00:39:28 +0100 Subject: s3:net: remove alloc parameter from idmap_store_secret() (net idmap store). --- source3/utils/net_idmap.c | 10 +++------- source3/utils/net_proto.h | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'source3') diff --git a/source3/utils/net_idmap.c b/source3/utils/net_idmap.c index 488132b515..4bf6ecd0d6 100644 --- a/source3/utils/net_idmap.c +++ b/source3/utils/net_idmap.c @@ -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")); diff --git a/source3/utils/net_proto.h b/source3/utils/net_proto.h index 9e9e82fb84..99e0cbd7a4 100644 --- a/source3/utils/net_proto.h +++ b/source3/utils/net_proto.h @@ -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); -- cgit