]> Cypherpunks repositories - gostls13.git/commit
syscall: check correct group in Faccessat
authorDamien Neil <dneil@google.com>
Tue, 12 Apr 2022 20:38:17 +0000 (13:38 -0700)
committerDamien Neil <dneil@google.com>
Tue, 12 Apr 2022 21:12:19 +0000 (21:12 +0000)
commitf66925e854e71e0c54b581885380a490d7afa30c
treefa20740eba8aea6fa9c1cb980cfb0d5676433696
parent4569fe64101c2209e3429bd1c953b5f4021fc43d
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

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>
src/syscall/syscall_linux.go