summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2012-08-28 10:56:21 +0200
committerMartin Kosek <mkosek@redhat.com>2012-09-06 09:24:59 +0200
commit931e8906803bda26cd5d3efe1ec5c803fedf4876 (patch)
tree0cc3df0625d611503ec76a0c6de5127811b87f47
parent260940ceb4da00bd2578a2d7bcbc596d40056bf8 (diff)
downloadfreeipa.git-931e8906803bda26cd5d3efe1ec5c803fedf4876.tar.gz
freeipa.git-931e8906803bda26cd5d3efe1ec5c803fedf4876.tar.xz
freeipa.git-931e8906803bda26cd5d3efe1ec5c803fedf4876.zip
ipasam: remove fetch_ldap_pw()
-rw-r--r--daemons/ipa-sam/ipa_sam.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/daemons/ipa-sam/ipa_sam.c b/daemons/ipa-sam/ipa_sam.c
index 65e32c7d..95add09d 100644
--- a/daemons/ipa-sam/ipa_sam.c
+++ b/daemons/ipa-sam/ipa_sam.c
@@ -82,7 +82,6 @@ struct trustAuthInOutBlob {
enum ndr_err_code ndr_pull_trustAuthInOutBlob(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutBlob *r); /*available in libndr-samba.so */
-bool fetch_ldap_pw(char **dn, char** pw); /* available in libpdb.so */
bool sid_check_is_builtin(const struct dom_sid *sid); /* available in libpdb.so */
/* available in libpdb.so, renamed from sid_check_is_domain() in c43505b621725c9a754f0ee98318d451b093f2ed */
bool sid_linearize(char *outbuf, size_t len, const struct dom_sid *sid); /* available in libsmbconf.so */
@@ -3688,8 +3687,6 @@ static NTSTATUS pdb_init_ipasam(struct pdb_methods **pdb_method,
char *dn = NULL;
char *domain_sid_string = NULL;
struct dom_sid *ldap_domain_sid = NULL;
- char *bind_dn = NULL;
- char *bind_secret = NULL;
LDAPMessage *result = NULL;
LDAPMessage *entry = NULL;
@@ -3723,13 +3720,8 @@ static NTSTATUS pdb_init_ipasam(struct pdb_methods **pdb_method,
status = ipasam_generate_principals(ldap_state->ipasam_privates);
if (!NT_STATUS_IS_OK(status)) {
- if (!fetch_ldap_pw(&bind_dn, &bind_secret)) {
- DEBUG(0, ("pdb_init_ipasam: Failed to retrieve LDAP password from secrets.tdb\n"));
- return NT_STATUS_NO_MEMORY;
- }
- status = smbldap_init(*pdb_method, pdb_get_tevent_context(),
- uri, false, bind_dn, bind_secret,
- &ldap_state->smbldap_state);
+ DEBUG(0, ("Failed to generate kerberos principal for LDAP authentication.\n"));
+ return status;
} else {
/* We authenticate via GSSAPI and thus will use kerberos principal to bind our access */
status = smbldap_init(*pdb_method, pdb_get_tevent_context(),