diff options
author | Jakob Unterwurzacher | 2021-02-06 11:13:22 +0100 |
---|---|---|
committer | Jakob Unterwurzacher | 2021-02-06 11:38:25 +0100 |
commit | 80a651a19474c78b1b2716cbf8c85ffd78698823 (patch) | |
tree | a5c83754a197c789c26e5a15bf24707a1cd9113e /test.bash | |
parent | 3ab1bcf1c5aacafe4339564ff0a09c349d3201a0 (diff) |
syscallcompat: MknodatUser: work around changed syscall.Setgroups semantics
Since go1.16beta1 (commit d1b1145cace8b968307f9311ff611e4bb810710c ,
https://go-review.googlesource.com/c/go/+/210639 )
syscall.{Setgroups,Setregid,Setreuid} affects all threads, which
is exactly what we not want.
We now use unix.{Setgroups,Setregid,Setreuid} instead.
Workarounds https://github.com/golang/go/issues/1435 .
Diffstat (limited to 'test.bash')
-rwxr-xr-x | test.bash | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -80,7 +80,14 @@ else fi if grep -R "panic(" ./*.go internal ; then - echo "Please use log.Panic instead of naked panic!" + echo "$MYNAME: Please use log.Panic instead of naked panic!" + exit 1 +fi + +# All functions from the commit msg in https://go-review.googlesource.com/c/go/+/210639 +if grep -R -E 'syscall.(Setegid|Seteuid|Setgroups|Setgid|Setregid|Setreuid|Setresgid|Setresuid|Setuid)\(' \ + ./*.go internal ; then + echo "$MYNAME: You probably want to use unix.Setgroups and friends. See the comments in OpenatUser() for why." exit 1 fi |