Commit | Line | Data |
---|---|---|
ec4cc5e3 FF |
1 | diff -N -u -r ../go/src/os/user/getgrouplist_unix.go ./src/os/user/getgrouplist_unix.go |
2 | --- ../go/src/os/user/getgrouplist_unix.go 2016-08-15 18:48:00.000000000 -0400 | |
3 | +++ ./src/os/user/getgrouplist_unix.go 2016-08-17 10:33:10.485667876 -0400 | |
4 | @@ -2,7 +2,7 @@ | |
5 | // Use of this source code is governed by a BSD-style | |
6 | // license that can be found in the LICENSE file. | |
7 | ||
8 | -// +build dragonfly freebsd !android,linux netbsd openbsd | |
9 | +// +build dragonfly freebsd linux netbsd openbsd | |
10 | ||
11 | package user | |
12 | ||
13 | diff -N -u -r ../go/src/os/user/listgroups_unix.go ./src/os/user/listgroups_unix.go | |
14 | --- ../go/src/os/user/listgroups_unix.go 2016-08-15 18:48:00.000000000 -0400 | |
15 | +++ ./src/os/user/listgroups_unix.go 2016-08-17 10:33:10.485667876 -0400 | |
16 | @@ -2,7 +2,7 @@ | |
17 | // Use of this source code is governed by a BSD-style | |
18 | // license that can be found in the LICENSE file. | |
19 | ||
20 | -// +build dragonfly darwin freebsd !android,linux netbsd openbsd | |
21 | +// +build dragonfly darwin freebsd linux netbsd openbsd | |
22 | ||
23 | package user | |
24 | ||
25 | diff -N -u -r ../go/src/os/user/lookup_android.go ./src/os/user/lookup_android.go | |
26 | --- ../go/src/os/user/lookup_android.go 2016-08-15 18:48:00.000000000 -0400 | |
27 | +++ ./src/os/user/lookup_android.go 1969-12-31 19:00:00.000000000 -0500 | |
28 | @@ -1,38 +0,0 @@ | |
29 | -// Copyright 2016 The Go Authors. All rights reserved. | |
30 | -// Use of this source code is governed by a BSD-style | |
31 | -// license that can be found in the LICENSE file. | |
32 | - | |
33 | -// +build android | |
34 | - | |
35 | -package user | |
36 | - | |
37 | -import "errors" | |
38 | - | |
39 | -func init() { | |
40 | - userImplemented = false | |
41 | - groupImplemented = false | |
42 | -} | |
43 | - | |
44 | -func current() (*User, error) { | |
45 | - return nil, errors.New("user: Current not implemented on android") | |
46 | -} | |
47 | - | |
48 | -func lookupUser(string) (*User, error) { | |
49 | - return nil, errors.New("user: Lookup not implemented on android") | |
50 | -} | |
51 | - | |
52 | -func lookupUserId(string) (*User, error) { | |
53 | - return nil, errors.New("user: LookupId not implemented on android") | |
54 | -} | |
55 | - | |
56 | -func lookupGroup(string) (*Group, error) { | |
57 | - return nil, errors.New("user: LookupGroup not implemented on android") | |
58 | -} | |
59 | - | |
60 | -func lookupGroupId(string) (*Group, error) { | |
61 | - return nil, errors.New("user: LookupGroupId not implemented on android") | |
62 | -} | |
63 | - | |
64 | -func listGroups(*User) ([]string, error) { | |
65 | - return nil, errors.New("user: GroupIds not implemented on android") | |
66 | -} | |
67 | diff -N -u -r ../go/src/os/user/lookup_unix.go ./src/os/user/lookup_unix.go | |
68 | --- ../go/src/os/user/lookup_unix.go 2016-08-15 18:48:00.000000000 -0400 | |
69 | +++ ./src/os/user/lookup_unix.go 2016-08-17 10:42:53.604807242 -0400 | |
70 | @@ -2,7 +2,7 @@ | |
71 | // Use of this source code is governed by a BSD-style | |
72 | // license that can be found in the LICENSE file. | |
73 | ||
74 | -// +build darwin dragonfly freebsd !android,linux netbsd openbsd solaris | |
75 | +// +build darwin dragonfly freebsd linux netbsd openbsd solaris | |
76 | // +build cgo | |
77 | ||
78 | package user | |
79 | @@ -35,12 +35,14 @@ | |
80 | ||
81 | static int mygetgrgid_r(int gid, struct group *grp, | |
82 | char *buf, size_t buflen, struct group **result) { | |
83 | - return getgrgid_r(gid, grp, buf, buflen, result); | |
84 | + result = 0; | |
85 | + return 0; | |
86 | } | |
87 | ||
88 | static int mygetgrnam_r(const char *name, struct group *grp, | |
89 | char *buf, size_t buflen, struct group **result) { | |
90 | - return getgrnam_r(name, grp, buf, buflen, result); | |
91 | + result = 0; | |
92 | + return 0; | |
93 | } | |
94 | */ | |
95 | import "C" | |
96 | @@ -117,8 +119,8 @@ | |
97 | Uid: strconv.Itoa(int(pwd.pw_uid)), | |
98 | Gid: strconv.Itoa(int(pwd.pw_gid)), | |
99 | Username: C.GoString(pwd.pw_name), | |
100 | - Name: C.GoString(pwd.pw_gecos), | |
101 | - HomeDir: C.GoString(pwd.pw_dir), | |
102 | + Name: "", | |
103 | + HomeDir: "@TERMUX_HOME@", | |
104 | } | |
105 | // The pw_gecos field isn't quite standardized. Some docs | |
106 | // say: "It is expected to be a comma separated list of |