Skip to content

Commit

Permalink
fix: correct file perms
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalvas committed Mar 13, 2024
1 parent 90e82cb commit 2adab81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/oneauth/commands/cmd_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2adab81

Please sign in to comment.