]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.17] syscall: check correct group in Faccessat
authorDamien Neil <dneil@google.com>
Tue, 12 Apr 2022 20:38:17 +0000 (13:38 -0700)
committerHeschi Kreinick <heschi@google.com>
Mon, 9 May 2022 20:18:07 +0000 (20:18 +0000)
commit04781d14d2d33acbaf70f77e3a58ae0f3c90757c
treef9f6e4a4e0f9326b00d6fabb3c42ff4a1a6d672c
parent4c5acd4b5729e3345a35ce43a8633d24dc1e42fc
[release-branch.go1.17] syscall: check correct group in Faccessat

The Faccessat call checks the user, group, or other permission bits of a
file to see if the calling process can access it. The test to see if the
group permissions should be used was made with the wrong group id, using
the process's group id rather than the file's group id. Fix this to use
the correct group id.

No test since we cannot easily change file permissions when not running
as root and the test is meaningless if running as root.

For #52313
Fixes #52439

Change-Id: I4e2c84754b0af7830b40fd15dedcbc58374d75ee
Reviewed-on: https://go-review.googlesource.com/c/go/+/399539
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
(cherry picked from commit f66925e854e71e0c54b581885380a490d7afa30c)
Reviewed-on: https://go-review.googlesource.com/c/go/+/401078
Auto-Submit: Tatiana Bradley <tatiana@golang.org>
Run-TryBot: Tatiana Bradley <tatiana@golang.org>
Run-TryBot: Damien Neil <dneil@google.com>
Auto-Submit: Damien Neil <dneil@google.com>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
src/syscall/syscall_linux.go