diff options
author | Alexander Bokovoy <abokovoy@redhat.com> | 2012-07-06 12:48:27 +0300 |
---|---|---|
committer | Alexander Bokovoy <abokovoy@redhat.com> | 2012-07-06 13:39:27 +0300 |
commit | 8c5504d26ac3a2bbbb2cc9112eece70dac22a658 (patch) | |
tree | aba486f569b9edddbf104e91868e638e9655b0a2 /daemons | |
parent | 75cb9bb0e15f31940576e3a366b58a340c6953d8 (diff) | |
download | freeipa.git-8c5504d26ac3a2bbbb2cc9112eece70dac22a658.tar.gz freeipa.git-8c5504d26ac3a2bbbb2cc9112eece70dac22a658.tar.xz freeipa.git-8c5504d26ac3a2bbbb2cc9112eece70dac22a658.zip |
reduce redundant checks in ldapsam_search_users() to a single statement
Diffstat (limited to 'daemons')
-rw-r--r-- | daemons/ipa-sam/ipa_sam.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/daemons/ipa-sam/ipa_sam.c b/daemons/ipa-sam/ipa_sam.c index 29fc95e4..86ed3fbd 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, |