diff options
Diffstat (limited to 'ipc/uapi_unix.go')
-rw-r--r-- | ipc/uapi_unix.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ipc/uapi_unix.go b/ipc/uapi_unix.go index 510ab31..dcce167 100644 --- a/ipc/uapi_unix.go +++ b/ipc/uapi_unix.go @@ -1,8 +1,8 @@ -// +build linux darwin freebsd openbsd +//go:build linux || darwin || freebsd || openbsd /* SPDX-License-Identifier: MIT * - * Copyright (C) 2017-2020 WireGuard LLC. All Rights Reserved. + * Copyright (C) 2017-2025 WireGuard LLC. All Rights Reserved. */ package ipc @@ -21,6 +21,7 @@ const ( IpcErrorProtocol = -int64(unix.EPROTO) IpcErrorInvalid = -int64(unix.EINVAL) IpcErrorPortInUse = -int64(unix.EADDRINUSE) + IpcErrorUnknown = -55 // ENOANO ) // socketDirectory is variable because it is modified by a linker @@ -32,7 +33,7 @@ func sockPath(iface string) string { } func UAPIOpen(name string) (*os.File, error) { - if err := os.MkdirAll(socketDirectory, 0755); err != nil { + if err := os.MkdirAll(socketDirectory, 0o755); err != nil { return nil, err } @@ -42,7 +43,7 @@ func UAPIOpen(name string) (*os.File, error) { return nil, err } - oldUmask := unix.Umask(0077) + oldUmask := unix.Umask(0o077) defer unix.Umask(oldUmask) listener, err := net.ListenUnix("unix", addr) |