Skip to content
Snippets Groups Projects
Verified Commit 217dee64 authored by Ophestra's avatar Ophestra
Browse files

feat: make socket world accessible


This socket is typically placed in a directory with restrictive permissions, and that is a much easier way to control access than to have the application set it to some custom value.

Signed-off-by: default avatarOphestra Umiker <cat@ophivana.moe>
parent 397f7116
No related branches found
No related tags found
No related merge requests found
Pipeline #974 passed
...@@ -80,6 +80,9 @@ func serve(sig chan os.Signal, db *leveldb.DB) error { ...@@ -80,6 +80,9 @@ func serve(sig chan os.Signal, db *leveldb.DB) error {
if l, err := net.Listen("unix", conf[listen]); err != nil { if l, err := net.Listen("unix", conf[listen]); err != nil {
return err return err
} else { } else {
if err = os.Chmod(conf[listen], 0777); err != nil {
log.Printf("cannot change ownership of socket %q: %v", conf[listen], err)
}
return app.Listener(l) return app.Listener(l)
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment