1
0
mirror of https://github.com/golang/go synced 2024-10-04 19:21:21 -06:00
go/src/os/user/lookup_android.go
Ross Light 42f07ff267 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>
2016-03-07 20:11:19 +00:00

39 lines
961 B
Go

// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build android
package user
import "errors"
func init() {
userImplemented = false
groupImplemented = false
}
func current() (*User, error) {
return nil, errors.New("user: Current not implemented on android")
}
func lookupUser(string) (*User, error) {
return nil, errors.New("user: Lookup not implemented on android")
}
func lookupUserId(string) (*User, error) {
return nil, errors.New("user: LookupId not implemented on android")
}
func lookupGroup(string) (*Group, error) {
return nil, errors.New("user: LookupGroup not implemented on android")
}
func lookupGroupId(string) (*Group, error) {
return nil, errors.New("user: LookupGroupId not implemented on android")
}
func listGroups(*User) ([]string, error) {
return nil, errors.New("user: GroupIds not implemented on android")
}