summaryrefslogtreecommitdiff
path: root/source3/winbindd/idmap_ldap.c
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2010-12-08 00:32:53 +0100
committerMichael Adam <obnox@samba.org>2011-01-02 12:51:54 +0100
commit2d3a8b196fe1ef47a5fb7bc5c13671125f59da91 (patch)
treeaf2b5275b66e9de4d4c57458273c95b0ab6e03ad /source3/winbindd/idmap_ldap.c
parent52b37de5d88301ce1a6d05128d9c19043f5a2b51 (diff)
downloadsamba-2d3a8b196fe1ef47a5fb7bc5c13671125f59da91.tar.gz
samba-2d3a8b196fe1ef47a5fb7bc5c13671125f59da91.tar.bz2
samba-2d3a8b196fe1ef47a5fb7bc5c13671125f59da91.zip
s3:idmap_ldap: remove special handling of alloc secret (not used any more).
Diffstat (limited to 'source3/winbindd/idmap_ldap.c')
-rw-r--r--source3/winbindd/idmap_ldap.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/source3/winbindd/idmap_ldap.c b/source3/winbindd/idmap_ldap.c
index 91c8f1e6be..aea5d6acf5 100644
--- a/source3/winbindd/idmap_ldap.c
+++ b/source3/winbindd/idmap_ldap.c
@@ -38,17 +38,13 @@
#include "smbldap.h"
-static char *idmap_fetch_secret(const char *backend, bool alloc,
+static char *idmap_fetch_secret(const char *backend,
const char *domain, const char *identity)
{
char *tmp, *ret;
int r;
- 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 NULL;
@@ -102,12 +98,13 @@ static NTSTATUS get_credentials( TALLOC_CTX *mem_ctx,
if ( tmp ) {
if (!dom) {
- /* only the alloc backend can pass in a NULL dom */
- secret = idmap_fetch_secret("ldap", True,
- NULL, tmp);
+ DEBUG(0, ("get_credentials: Invalid domain 'NULL' "
+ "encountered for user DN %s\n",
+ tmp));
+ ret = NT_STATUS_UNSUCCESSFUL;
+ goto done;
} else {
- secret = idmap_fetch_secret("ldap", False,
- dom->name, tmp);
+ secret = idmap_fetch_secret("ldap", dom->name, tmp);
}
if (!secret) {