fix(rpm): example config in /etc/logcorrelator + socket permissions 0666
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled

- Install logcorrelator.yml.example to /etc/logcorrelator/ instead of /usr/share/logcorrelator/
- Change default socket permissions from 0660 to 0666 (world read/write)
- Bump version to 1.1.2
- Remove CHANGELOG.md

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
Jacquin Antoine
2026-03-02 22:07:50 +01:00
parent ef819e8868
commit 324b0042f8
8 changed files with 23 additions and 195 deletions

View File

@ -316,17 +316,17 @@ func (c *CorrelationConfig) GetNetworkTTLS() int {
}
// GetSocketPermissions returns the socket permissions as os.FileMode.
// Default is 0660 (owner + group read/write).
// Default is 0666 (world read/write).
func (c *UnixSocketConfig) GetSocketPermissions() os.FileMode {
trimmed := strings.TrimSpace(c.SocketPermissions)
if trimmed == "" {
return 0660
return 0666
}
// Parse octal string (e.g., "0660", "660", "0666")
perms, err := strconv.ParseUint(trimmed, 8, 32)
if err != nil {
return 0660
return 0666
}
return os.FileMode(perms)

View File

@ -433,7 +433,7 @@ func TestGetSocketPermissions(t *testing.T) {
config: UnixSocketConfig{
SocketPermissions: "",
},
expected: 0660,
expected: 0666,
},
{
name: "explicit 0660",
@ -461,7 +461,7 @@ func TestGetSocketPermissions(t *testing.T) {
config: UnixSocketConfig{
SocketPermissions: "invalid",
},
expected: 0660,
expected: 0666,
},
}