]> Cypherpunks repositories - gostls13.git/commit
os/user: add LookupGroup, LookupGroupId, and User.GroupIds functions
authorRoss Light <light@google.com>
Thu, 4 Feb 2016 23:39:00 +0000 (15:39 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 7 Mar 2016 20:11:19 +0000 (20:11 +0000)
commit42f07ff2679d38a03522db3ccd488f4cc230c8c2
treea70ce67cb209f4b9bfd518f258d13946f46c4a41
parentff555f1159040e644332872c221daa308a7b9b82
os/user: add LookupGroup, LookupGroupId, and User.GroupIds functions

As part of local testing with a large group member list, I discovered
that the lookup functions don't resize their buffer if they receive
ERANGE.  I fixed this as a side-effect of this CL.

Thanks to @andrenth for the original CL.

Fixes #2617

Change-Id: Ie6aae2fe0a89eae5cce85786869a8acaa665ffe9
Reviewed-on: https://go-review.googlesource.com/19235
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/os/user/lookup.go
src/os/user/lookup_android.go [new file with mode: 0644]
src/os/user/lookup_plan9.go
src/os/user/lookup_stubs.go
src/os/user/lookup_unix.go
src/os/user/lookup_windows.go
src/os/user/user.go
src/os/user/user_test.go