os/user: implement (*User).GroupIds on solaris
It seems like getgrouplist is supported since Solaris 11.3 (released in
2016):
https://docs.oracle.com/cd/E86824_01/html/E54766/getgrouplist-3c.html
Use it to implement (*User).GroupIds on solaris, like on other Unix
platforms.
Unfortunately it looks like getgrouplist was added to illumos only
fairly recently, see
https://github.com/illumos/illumos-gate/commit/
f2c438c5058c64b7373448f239156bf60009abcb
Thus, don't use it on GOOS=illumos for now.
Updates #14709
Change-Id: Ibfcdbfca6b7d1af96630512d08921e5637ca76d4
Reviewed-on: https://go-review.googlesource.com/c/go/+/315278
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>