os/user: use stdlib version of this package

I tried implementing enough CGo support to get the native os/user
package to work. But I hit a few bugs, probably in CGo itself. Then I
realized I could just as well set the osusergo build tag to disable CGo
for this specific case.

This actually gets the os/user package to work correctly on Linux (I
confirmed it returns my name/uid/homedir etc). On other systems, it
probably just returns an error if it can't determine these kinds of
things. But that's no worse than the current behavior which just doesn't
do anything at all.
This commit is contained in:
Ayke van Laethem
2024-07-02 17:20:07 +02:00
committed by Ron Evans
parent d3e67cf18c
commit bf8d6460da
4 changed files with 3 additions and 60 deletions
-1
View File
@@ -247,7 +247,6 @@ func pathsToOverride(goMinor int, needsSyscallPackage bool) map[string]bool {
"net/": true,
"net/http/": false,
"os/": true,
"os/user/": false,
"reflect/": false,
"runtime/": false,
"sync/": true,