UNIX socket creation - Don't chmod if mode not set
This commit is contained in:
parent
610cbf28f8
commit
e6aaa09795
1 changed files with 5 additions and 3 deletions
|
@ -24,10 +24,12 @@ func configureSocket(cfg tSocketConfig) error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if cfg.Mode != 0 {
|
||||||
err := os.Chmod(cfg.Path, cfg.Mode)
|
err := os.Chmod(cfg.Path, cfg.Mode)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("Cannot set UNIX socket access mode: %w", err)
|
return fmt.Errorf("Cannot set UNIX socket access mode: %w", err)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue