fix(rpm): example config in /etc/logcorrelator + socket permissions 0666
- 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:
@ -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)
|
||||
|
||||
@ -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,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user