36 lines
1.3 KiB
Diff
36 lines
1.3 KiB
Diff
From 8c5504d26ac3a2bbbb2cc9112eece70dac22a658 Mon Sep 17 00:00:00 2001
|
|
From: Alexander Bokovoy <abokovoy@redhat.com>
|
|
Date: Fri, 6 Jul 2012 12:48:27 +0300
|
|
Subject: [PATCH 06/79] reduce redundant checks in ldapsam_search_users() to a
|
|
single statement
|
|
|
|
---
|
|
daemons/ipa-sam/ipa_sam.c | 9 +--------
|
|
1 file changed, 1 insertion(+), 8 deletions(-)
|
|
|
|
diff --git a/daemons/ipa-sam/ipa_sam.c b/daemons/ipa-sam/ipa_sam.c
|
|
index 29fc95e457179716c1c70c6f061b1cde9e3f472b..86ed3fbd3e6d1894fd398c3c1c94d34c2b7ec273 100644
|
|
--- a/daemons/ipa-sam/ipa_sam.c
|
|
+++ b/daemons/ipa-sam/ipa_sam.c
|
|
@@ -1044,16 +1044,9 @@ static bool ldapsam_search_users(struct pdb_methods *methods,
|
|
|
|
state->connection = ldap_state->smbldap_state;
|
|
|
|
- if ((acct_flags != 0) && ((acct_flags & ACB_NORMAL) != 0))
|
|
- state->base = ldap_state->ipasam_privates->base_dn;
|
|
- else if ((acct_flags != 0) &&
|
|
- ((acct_flags & (ACB_WSTRUST|ACB_SVRTRUST|ACB_DOMTRUST)) != 0))
|
|
- state->base = ldap_state->ipasam_privates->base_dn;
|
|
- else
|
|
- state->base = ldap_state->ipasam_privates->base_dn;
|
|
+ state->base = talloc_strdup(search, ldap_state->ipasam_privates->base_dn);
|
|
|
|
state->acct_flags = acct_flags;
|
|
- state->base = talloc_strdup(search, state->base);
|
|
state->scope = LDAP_SCOPE_SUBTREE;
|
|
state->filter = get_ldap_filter(search, "*");
|
|
state->attrs = talloc_attrs(search, "uid", LDAP_ATTRIBUTE_SID,
|
|
--
|
|
1.7.11.2
|
|
|