diff options
author | Gerald Carter <jerry@samba.org> | 2007-02-06 17:29:18 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:17:46 -0500 |
commit | e7d2f462297087d785e6b16d018540f3a7110d24 (patch) | |
tree | 767b5084d86c16bba783c68029355e8832992a1d /source3/nsswitch/idmap.c | |
parent | 6ab97dc69dab505699ef44d43a19fa7835e28751 (diff) | |
download | samba-e7d2f462297087d785e6b16d018540f3a7110d24.tar.gz samba-e7d2f462297087d785e6b16d018540f3a7110d24.tar.xz samba-e7d2f462297087d785e6b16d018540f3a7110d24.zip |
r21182: * Refactor the code to obtain the LDAP connection credentials
from both idmap_ldap_{alloc,db}_init()
* Fix the backwards compat support in idmap_ldap.c
* Fix a spelling error in the idmap_fetch_secret() function name
(This used to be commit 615a10435618abb89852910a0d36c1d9ff35647f)
Diffstat (limited to 'source3/nsswitch/idmap.c')
-rw-r--r-- | source3/nsswitch/idmap.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/nsswitch/idmap.c b/source3/nsswitch/idmap.c index 4652980807d..6de2187e5f0 100644 --- a/source3/nsswitch/idmap.c +++ b/source3/nsswitch/idmap.c @@ -1283,8 +1283,8 @@ void idmap_dump_maps(char *logfile) fclose(dump); } -const char *idmap_fecth_secret(const char *backend, bool alloc, - const char *domain, const char *identity) +char *idmap_fetch_secret(const char *backend, bool alloc, + const char *domain, const char *identity) { char *tmp, *ret; int r; @@ -1295,11 +1295,13 @@ const char *idmap_fecth_secret(const char *backend, bool alloc, r = asprintf(&tmp, "IDMAP_%s_%s", backend, domain); } - if (r < 0) return NULL; + if (r < 0) + return NULL; strupper_m(tmp); /* make sure the key is case insensitive */ ret = secrets_fetch_generic(tmp, identity); - free(tmp); + SAFE_FREE( tmp ); + return ret; } |