From e8b3de494e47ae78bc9ef6b7b423f954bacfc887 Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Mon, 31 Oct 2022 10:41:34 +0100 Subject: [PATCH] Fix lint Signed-off-by: Kristoffer Dalby --- cmd/headscale/cli/utils.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/headscale/cli/utils.go b/cmd/headscale/cli/utils.go index c42f3c6a..a6e04f9c 100644 --- a/cmd/headscale/cli/utils.go +++ b/cmd/headscale/cli/utils.go @@ -19,6 +19,7 @@ import ( const ( HeadscaleDateTimeFormat = "2006-01-02 15:04:05" + SocketWritePermissions = 0o666 ) func getHeadscaleApp() (*headscale.Headscale, error) { @@ -83,7 +84,7 @@ func getHeadscaleCLIClient() (context.Context, v1.HeadscaleServiceClient, *grpc. // Try to give the user better feedback if we cannot write to the headscale // socket. - socket, err := os.OpenFile(cfg.UnixSocket, os.O_WRONLY, 0o666) + socket, err := os.OpenFile(cfg.UnixSocket, os.O_WRONLY, SocketWritePermissions) if err != nil { if os.IsPermission(err) { log.Fatal().