Re:Traitor: Linux privilege escalation made easy
by axaxs on Monday February 22, 2021 @12:00PM
(#26226827)
If you opt into modules, modules get stored in GOPATH. If you don't use modules...source gets downloaded into GOPATH. If GOPATH is unset, it uses ~/go.
Re:Traitor: Linux privilege escalation made easy
by arghwhat on Monday February 22, 2021 @02:28PM
(#26229265)
1. If you opt into modules, $GOMODCACHE is used for go mod downloads. It defaults to $GOPATH/pkg/mod.
2. If you don't use modules, $GOPATH is used.
3. If $GOPATH isn't set, it defaults to ~/go.
Re:Traitor: Linux privilege escalation made easy
by tsimionescu on Monday February 22, 2021 @04:14PM
(#26230731)
Actually, modules are still downloaded to a global location, they are not copied locally to your project by default.
Re:Traitor: Linux privilege escalation made easy
by oauea on Tuesday February 23, 2021 @11:42AM
(#26239393)
Well yes, but most languages have some kind of cache in the home folder.
Re:Traitor: Linux privilege escalation made easy
by tsimionescu on Friday February 26, 2021 @02:17AM
(#26272134)
So yes, go does "assume that you have a directory in $HOME that is for it's own personal use?"
The project has to opt into it, which appears to be the case here since there is a `go.mod` file. Are you using a modern version of Go?