Skip to content

Commit

Permalink
Change socket permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
eliaskoromilas committed May 8, 2024
1 parent 162d2f5 commit 098e9fe
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion internal/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,16 @@ func listen(path string) (net.Listener, error) {
return nil, err
}

return net.Listen("unix", path)
listener, err := net.Listen("unix", path)
if err != nil {
return nil, err
}

if err := os.Chmod(path, os.ModePerm); err != nil {
listener.Close()

return nil, err
}

return listener, nil
}

0 comments on commit 098e9fe

Please sign in to comment.