Description: fix for winbind returns unmapped groups in getgroups() when using idmap_ad Author: Andreas Schneider Origin: https://attachments.samba.org/attachment.cgi?id=10300 Bug: https://bugzilla.samba.org/show_bug.cgi?id=10824 Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/samba/+bug/1307778 Applied-Upstream: 4.1.13 Last-Update: 2016-01-19 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ Index: samba-4.1.6+dfsg/nsswitch/winbind_nss_linux.c =================================================================== --- samba-4.1.6+dfsg.orig/nsswitch/winbind_nss_linux.c 2013-06-13 11:21:02.000000000 +0200 +++ samba-4.1.6+dfsg/nsswitch/winbind_nss_linux.c 2016-01-19 11:30:52.518297374 +0100 @@ -1101,6 +1101,11 @@ continue; } + /* Skip groups without a mapping */ + if (gid_list[i] == (uid_t)-1) { + continue; + } + /* Filled buffer ? If so, resize. */ if (*start == *size) {