summaryrefslogtreecommitdiff
path: root/source4/ldap_server
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2017-05-12 16:04:02 +0200
committerAndrew Bartlett <abartlet@samba.org>2017-06-15 09:13:23 +0200
commite8d431250edebf96c1d80aacf2f676c93da907f4 (patch)
treeeefff3f4de600b3c1333a396ef92e3275d42957c /source4/ldap_server
parentb271794ca8ae2ea052a6fc87d89f506dcbae171f (diff)
downloadsamba-e8d431250edebf96c1d80aacf2f676c93da907f4.tar.gz
s4:ldap_server: avoid pointless check arround LDAP_INVALID_CREDENTIALS
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/ldap_server')
-rw-r--r--source4/ldap_server/ldap_bind.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/source4/ldap_server/ldap_bind.c b/source4/ldap_server/ldap_bind.c
index e36cb1cebf6..06b52fe9510 100644
--- a/source4/ldap_server/ldap_bind.c
+++ b/source4/ldap_server/ldap_bind.c
@@ -428,11 +428,9 @@ static NTSTATUS ldapsrv_BindSASL(struct ldapsrv_call *call)
if (!NT_STATUS_IS_OK(status)) {
status = nt_status_squash(status);
- if (result == 0) {
- result = LDAP_INVALID_CREDENTIALS;
- errstr = ldapsrv_bind_error_msg(reply, HRES_SEC_E_LOGON_DENIED,
- 0x0C0904DC, status);
- }
+ result = LDAP_INVALID_CREDENTIALS;
+ errstr = ldapsrv_bind_error_msg(reply, HRES_SEC_E_LOGON_DENIED,
+ 0x0C0904DC, status);
talloc_unlink(conn, conn->gensec);
conn->gensec = NULL;
goto do_reply;