summaryrefslogtreecommitdiffstats
path: root/src/responder/nss
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2016-07-07 18:54:02 +0200
committerJakub Hrozek <jhrozek@redhat.com>2016-07-29 14:44:28 +0200
commit1594701fbdc341069e11cff9a85e7a795e52db3d (patch)
tree5c6c7384a606cc88cb6439bf6246affa1a3b7423 /src/responder/nss
parent17bfd9f69251781140e4b2b55ffeb649d7a79e86 (diff)
downloadsssd-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.c7
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);