diff options
author | Sumit Bose <sbose@redhat.com> | 2016-07-07 18:54:02 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2016-07-29 14:44:28 +0200 |
commit | 1594701fbdc341069e11cff9a85e7a795e52db3d (patch) | |
tree | 5c6c7384a606cc88cb6439bf6246affa1a3b7423 /src/responder/nss | |
parent | 17bfd9f69251781140e4b2b55ffeb649d7a79e86 (diff) | |
download | sssd-1594701fbdc341069e11cff9a85e7a795e52db3d.tar.gz sssd-1594701fbdc341069e11cff9a85e7a795e52db3d.tar.xz sssd-1594701fbdc341069e11cff9a85e7a795e52db3d.zip |
views: properly override group member names
Resolves https://fedorahosted.org/sssd/ticket/2948
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Diffstat (limited to 'src/responder/nss')
-rw-r--r-- | src/responder/nss/nsssrv_cmd.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/responder/nss/nsssrv_cmd.c b/src/responder/nss/nsssrv_cmd.c index 1ae179696..4e84b3202 100644 --- a/src/responder/nss/nsssrv_cmd.c +++ b/src/responder/nss/nsssrv_cmd.c @@ -2976,7 +2976,12 @@ static int fill_grent(struct sss_packet *packet, memnum = 0; if (!dom->ignore_group_members) { - el = sss_view_ldb_msg_find_element(dom, msg, SYSDB_MEMBERUID); + /* unconditionally prefer OVERRIDE_PREFIX SYSDB_MEMBERUID, it + * might contain override names from the default view */ + el = ldb_msg_find_element(msg, OVERRIDE_PREFIX SYSDB_MEMBERUID); + if (el == NULL) { + el = ldb_msg_find_element(msg, SYSDB_MEMBERUID); + } if (el) { ret = fill_members(packet, nctx->rctx, dom, nctx, el, &rzero, &rsize, &memnum); |