winbindd: queryuser - only get group name if needed
commitc819c7d58f05692628eb9673dfdca5dc1d212d43
authorUri Simchoni <uri@samba.org>
Wed, 7 Jun 2017 17:33:57 +0000 (7 20:33 +0300)
committerJeremy Allison <jra@samba.org>
Fri, 21 Jul 2017 17:11:13 +0000 (21 19:11 +0200)
tree2e22957bd9417a54c161074fc23ae99368acb50d
parente3a151e2472d97891c97cc898f27f3ccf712bf35
winbindd: queryuser - only get group name if needed

When calculating the user entry for a user, the
primary group id *name* might be needed if it is
part of a home dir / shell template (%g or %G).

Only resolve primary group SID to primary group name
if it is needed, thereby saving a round-trip to the DC
(and better handling situations where it is disconnected).

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/winbindd/wb_queryuser.c