Skip to content

Commit

Permalink
Correct coredump parameter from MaxFree to KeepFree
Browse files Browse the repository at this point in the history
Incorrect coredump paramters were added.

It should be `KeepFree` and `MaxFree` was never valid.

https://www.freedesktop.org/software/systemd/man/latest/coredump.conf.html#MaxUse=

* Fixes #398
  • Loading branch information
traylenator committed Dec 5, 2023
1 parent 155ed51 commit 7a3e180
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2095,7 +2095,7 @@ Struct[{
Optional['ExternalSizeMax'] => Pattern[/^[0-9]+(K|M|G|T|P|E)?$/],
Optional['JournalSizeMax'] => Pattern[/^[0-9]+(K|M|G|T|P|E)?$/],
Optional['MaxUse'] => Pattern[/^[0-9]+(K|M|G|T|P|E)?$/],
Optional['MaxFree'] => Pattern[/^[0-9]+(K|M|G|T|P|E)?$/],
Optional['KeepFree'] => Pattern[/^[0-9]+(K|M|G|T|P|E)?$/],
}]
```

Expand Down
5 changes: 3 additions & 2 deletions spec/type_aliases/systemd_coredumpsettings_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
'ExternalSizeMax' => '456G',
'JournalSizeMax' => '45T',
'MaxUse' => '1P',
'MaxFree' => '1E',
'KeepFree' => '1E',
}
)
}
Expand All @@ -28,7 +28,7 @@
'ExternalSizeMax' => '456',
'JournalSizeMax' => '45',
'MaxUse' => '1',
'MaxFree' => '5',
'KeepFree' => '5',
}
)
}
Expand All @@ -37,6 +37,7 @@
it { is_expected.not_to allow_value({ 'Compress' => 'maybe' }) }
it { is_expected.not_to allow_value({ 'MaxUse' => '-10' }) }
it { is_expected.not_to allow_value({ 'MaxFee' => '10Gig' }) }
it { is_expected.not_to allow_value({ 'MaxFree' => '10' }) }
it { is_expected.not_to allow_value({ 'ProcessSizeMax' => '20g' }) }
it { is_expected.not_to allow_value({ 'JournalSizeMax' => '20Z' }) }
end
2 changes: 1 addition & 1 deletion types/coredumpsettings.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
Optional['ExternalSizeMax'] => Pattern[/^[0-9]+(K|M|G|T|P|E)?$/],
Optional['JournalSizeMax'] => Pattern[/^[0-9]+(K|M|G|T|P|E)?$/],
Optional['MaxUse'] => Pattern[/^[0-9]+(K|M|G|T|P|E)?$/],
Optional['MaxFree'] => Pattern[/^[0-9]+(K|M|G|T|P|E)?$/],
Optional['KeepFree'] => Pattern[/^[0-9]+(K|M|G|T|P|E)?$/],
}
]

0 comments on commit 7a3e180

Please sign in to comment.