Skip to content

Commit

Permalink
Restrict socket permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
Dean-Coakley committed Sep 7, 2022
1 parent a89971a commit 6bf52cb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 14 deletions.
9 changes: 3 additions & 6 deletions src/extensions/advanced-metrics/reader/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,9 @@ func NewReader(address string) *Reader {
func newReader(address string, listenerConfig ListenerConfig, frameChannel chan Frame, newWorker NewWorkerConstructor) *Reader {
return &Reader{
listenerConfig: listenerConfig,

address: address,

newWorker: newWorker,

frameChannel: frameChannel,
address: address,
newWorker: newWorker,
frameChannel: frameChannel,
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/advanced_metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ func enableWritePermissionForSocket(path string) error {
case <-timeout:
return lastError
default:
lastError = os.Chmod(path, 0774)
lastError = os.Chmod(path, 0660)
if lastError == nil {
return nil
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 comment on commit 6bf52cb

@oliveromahony
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's great, just make sure it is tested OK before merging cc @craigell

Please sign in to comment.