diff --git a/cmd/oneauth/commands/cmd_agent.go b/cmd/oneauth/commands/cmd_agent.go index 0cc8072..71a7ae2 100644 --- a/cmd/oneauth/commands/cmd_agent.go +++ b/cmd/oneauth/commands/cmd_agent.go @@ -115,8 +115,8 @@ var agentCmd = &cli.Command{ config.ControlSocketPath, } { if stat, err := os.Stat(path); err == nil { - if stat.Mode() != 0600 { - log.Printf("fixing permissions on %s from %d", path, stat.Mode()) + if perm := stat.Mode().Perm(); perm != 0600 { + log.Printf("fixing permissions on %s from %d", path, perm) if err := os.Chmod(path, 0600); err != nil { return err