summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2009-10-09 14:30:51 -0500
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-10-16 14:08:11 +0200
commit180ca8ed881593e08c291b504e26ea7b8adf7705 (patch)
tree6fb14092503a2adb9ddf22a3f222322f3d9e5b5e /source4
parentcf77bf338260e33e7353f1176210d5cac5a6048d (diff)
downloadsamba-180ca8ed881593e08c291b504e26ea7b8adf7705.tar.gz
samba-180ca8ed881593e08c291b504e26ea7b8adf7705.tar.bz2
samba-180ca8ed881593e08c291b504e26ea7b8adf7705.zip
s4:auth - fixed problem reading bind DN from secrets database
Diffstat (limited to 'source4')
-rw-r--r--source4/auth/credentials/credentials.c5
-rw-r--r--source4/auth/credentials/credentials_files.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/source4/auth/credentials/credentials.c b/source4/auth/credentials/credentials.c
index 09366e8d54..549c2691f0 100644
--- a/source4/auth/credentials/credentials.c
+++ b/source4/auth/credentials/credentials.c
@@ -750,6 +750,11 @@ _PUBLIC_ bool cli_credentials_is_anonymous(struct cli_credentials *cred)
{
const char *username;
+ /* if bind dn is set it's not anonymous */
+ if (cred->bind_dn) {
+ return false;
+ }
+
if (cred->machine_account_pending) {
cli_credentials_set_machine_account(cred,
cred->machine_account_pending_lp_ctx);
diff --git a/source4/auth/credentials/credentials_files.c b/source4/auth/credentials/credentials_files.c
index 3fe38d5cd1..42e8ea082a 100644
--- a/source4/auth/credentials/credentials_files.c
+++ b/source4/auth/credentials/credentials_files.c
@@ -266,6 +266,9 @@ _PUBLIC_ NTSTATUS cli_credentials_set_secrets(struct cli_credentials *cred,
cli_credentials_set_anonymous(cred);
talloc_free(mem_ctx);
return NT_STATUS_CANT_ACCESS_DOMAIN_INFO;
+ } else {
+ /* store bind dn in credentials */
+ cli_credentials_set_bind_dn(cred, ldap_bind_dn);
}
}
}