And another incorrect use of unix.Stat_t
This commit is contained in:
parent
3832e45a6f
commit
4b6226a160
1 changed files with 2 additions and 1 deletions
|
|
@ -25,6 +25,7 @@ import (
|
|||
"slices"
|
||||
"strconv"
|
||||
"strings"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"kitty/tools/cli"
|
||||
|
|
@ -71,7 +72,7 @@ func get_destination(hostname string) (username, hostname_for_match string) {
|
|||
|
||||
func read_data_from_shared_memory(shm_name string) ([]byte, error) {
|
||||
data, err := shm.ReadWithSizeAndUnlink(shm_name, func(s fs.FileInfo) error {
|
||||
if stat, ok := s.Sys().(unix.Stat_t); ok {
|
||||
if stat, ok := s.Sys().(syscall.Stat_t); ok {
|
||||
if os.Getuid() != int(stat.Uid) || os.Getgid() != int(stat.Gid) {
|
||||
return fmt.Errorf("Incorrect owner on SHM file")
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue