Skip to content

Commit 3e4540b

Browse files
kolyshkingopherbot
authored andcommitted
os/user: use getgrouplist on illumos && cgo
The getgrouplist call is available on Illumos since December 2020: illumos/illumos-gate@f2c438c We can assume it is available for users now. Let's switch to using it when cgo is enabled. Since neither LUCY nor legacy trybots provide illumos, I tested this locally in a OpenIndiana VM, with and without osusergo, with cgo enabled and disabled. This is a continuation of CL 315278. Fixes golang#14709 Change-Id: I922049e7ea5f450f6900914b30967e522e56cfc9 Reviewed-on: https://go-review.googlesource.com/c/go/+/702975 Reviewed-by: Andrew Stormont <[email protected]> Auto-Submit: Damien Neil <[email protected]> Reviewed-by: Tobias Klauser <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Cherry Mui <[email protected]> Reviewed-by: Damien Neil <[email protected]> Auto-Submit: Kirill Kolyshkin <[email protected]> TryBot-Bypass: Kirill Kolyshkin <[email protected]>
1 parent 15fbe34 commit 3e4540b

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/os/user/cgo_listgroups_unix.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build (cgo || darwin) && !osusergo && (darwin || dragonfly || freebsd || (linux && !android) || netbsd || openbsd || (solaris && !illumos))
5+
//go:build (cgo || darwin) && !osusergo && (darwin || dragonfly || freebsd || (linux && !android) || netbsd || openbsd || solaris)
66

77
package user
88

src/os/user/getgrouplist_unix.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build cgo && !osusergo && (dragonfly || freebsd || (!android && linux) || netbsd || openbsd || (solaris && !illumos))
5+
//go:build cgo && !osusergo && (dragonfly || freebsd || (!android && linux) || netbsd || openbsd || solaris)
66

77
package user
88

src/os/user/listgroups_unix.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build ((darwin || dragonfly || freebsd || (js && wasm) || wasip1 || (!android && linux) || netbsd || openbsd || solaris) && ((!cgo && !darwin) || osusergo)) || aix || illumos
5+
//go:build ((darwin || dragonfly || freebsd || (js && wasm) || wasip1 || (!android && linux) || netbsd || openbsd || solaris) && ((!cgo && !darwin) || osusergo)) || aix
66

77
package user
88

src/os/user/listgroups_unix_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build ((darwin || dragonfly || freebsd || (js && wasm) || wasip1 || (!android && linux) || netbsd || openbsd || solaris) && ((!cgo && !darwin) || osusergo)) || aix || illumos
5+
//go:build ((darwin || dragonfly || freebsd || (js && wasm) || wasip1 || (!android && linux) || netbsd || openbsd || solaris) && ((!cgo && !darwin) || osusergo)) || aix
66

77
package user
88

0 commit comments

Comments
 (0)