Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipa_netgroups: Lowercase key to htable #59

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/providers/ipa/ipa_netgroups.c
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,13 @@ static int ipa_netgr_process_all(struct ipa_get_netgroups_state *state)
j = 0;
if (ret == EOK) {
for (j = 0; members[j]; j++) {
key.str = discard_const(members[j]);
/* Lower case the search key (we do this also when storing
* the entries in the hash table). */
key.str = talloc_strdup(state, discard_const(members[j]));
for (int p = 0; key.str[p] != '\0'; p++) {
key.str[p] = tolower(key.str[p]);
}

ret = hash_lookup(state->new_netgroups, &key, &value);
if (ret != HASH_SUCCESS) {
ret = ENOENT;
Expand Down