Infoleak ifnames and be more permissive
Listing interfaces is already permitted by the OS, so we allow this info leak too.
This commit is contained in:
parent
588b9f01ae
commit
0b647d1ca7
|
@ -150,7 +150,7 @@ func UAPIOpen(name string) (*os.File, error) {
|
|||
|
||||
// check if path exist
|
||||
|
||||
err := os.MkdirAll(socketDirectory, 0700)
|
||||
err := os.MkdirAll(socketDirectory, 0755)
|
||||
if err != nil && !os.IsExist(err) {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -167,6 +167,7 @@ func UAPIOpen(name string) (*os.File, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
oldUmask := unix.Umask(0077)
|
||||
listener, err := func() (*net.UnixListener, error) {
|
||||
|
||||
// initial connection attempt
|
||||
|
@ -191,6 +192,7 @@ func UAPIOpen(name string) (*os.File, error) {
|
|||
}
|
||||
return net.ListenUnix("unix", addr)
|
||||
}()
|
||||
unix.Umask(oldUmask)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
@ -147,7 +147,7 @@ func UAPIOpen(name string) (*os.File, error) {
|
|||
|
||||
// check if path exist
|
||||
|
||||
err := os.MkdirAll(socketDirectory, 0700)
|
||||
err := os.MkdirAll(socketDirectory, 0755)
|
||||
if err != nil && !os.IsExist(err) {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -164,6 +164,7 @@ func UAPIOpen(name string) (*os.File, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
oldUmask := unix.Umask(0077)
|
||||
listener, err := func() (*net.UnixListener, error) {
|
||||
|
||||
// initial connection attempt
|
||||
|
@ -188,6 +189,7 @@ func UAPIOpen(name string) (*os.File, error) {
|
|||
}
|
||||
return net.ListenUnix("unix", addr)
|
||||
}()
|
||||
unix.Umask(oldUmask)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Reference in a new issue