Title: #962: nss: use real primary gid if the value is overriden (sssd-1-16)
SYSDB_PRIMARY_GROUP_GIDNUM contains original primary group id from AD
because any possible override may not be known at the time of storing
Now we try to lookup group by its originalADgidNumber and if it is found
we will replace the original id with real primary group id.
Steps to reproduce:
1. Enroll SSSD to IPA domain with AD trust
2. Add ID override to Domain Users `ipa idoverridegroup-add 'Default Trust View'
"Domain Users(a)ad.vm" --gid=40000000`
3. On IPA server: Remove cache for the overrides to apply immediately and restart SSSD
`sssctl cache-remove --stop --start`
4. On IPA server: Resolve user `id Administrator(a)ad.vm`
There will be visible both new and old gids without the patch.
Reviewed-by: Sumit Bose <sbose(a)redhat.com>
(cherry picked from commit 03bc96247cbd567ad11a4c693c1d90580f903bb7)
To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/962/head:pr962
git checkout pr962