summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap/sdap_async_initgroups.c
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2015-04-22 16:57:37 +0200
committerJakub Hrozek <jhrozek@redhat.com>2015-04-29 17:15:12 +0200
commitb137bf848fa10aaeafce9079c63ab024e3f81e07 (patch)
tree1822b98de365805222cadd6cd5001502ee1d9bee /src/providers/ldap/sdap_async_initgroups.c
parentdbb263dddce4febf97add4ac5ef6e0aa2ced9f03 (diff)
downloadsssd-b137bf848fa10aaeafce9079c63ab024e3f81e07.tar.gz
sssd-b137bf848fa10aaeafce9079c63ab024e3f81e07.tar.xz
sssd-b137bf848fa10aaeafce9079c63ab024e3f81e07.zip
IPA: allow initgroups by SID for AD users
If a user from a trusted AD domain is search with the help of an override name the SID from the override anchor is used to search the user in AD. Currently the initgroups request only allows searches by name. With this patch a SID can be used as well. Resolves https://fedorahosted.org/sssd/ticket/2632 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> (cherry picked from commit f70a1adbfc30b9acc302027439fb8157e0c6ea2a)
Diffstat (limited to 'src/providers/ldap/sdap_async_initgroups.c')
-rw-r--r--src/providers/ldap/sdap_async_initgroups.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/providers/ldap/sdap_async_initgroups.c b/src/providers/ldap/sdap_async_initgroups.c
index ae617b9c4..5c5be5eab 100644
--- a/src/providers/ldap/sdap_async_initgroups.c
+++ b/src/providers/ldap/sdap_async_initgroups.c
@@ -2716,6 +2716,8 @@ struct tevent_req *sdap_get_initgr_send(TALLOC_CTX *memctx,
if (extra_value && strcmp(extra_value, EXTRA_NAME_IS_UPN) == 0) {
search_attr = state->opts->user_map[SDAP_AT_USER_PRINC].name;
+ } else if (extra_value && strcmp(extra_value, EXTRA_NAME_IS_SID) == 0) {
+ search_attr = state->opts->user_map[SDAP_AT_USER_OBJECTSID].name;
} else {
search_attr = state->opts->user_map[SDAP_AT_USER_NAME].name;
}