coredump filter: add mask for 'all' using UINT32_MAX, not UINT64_MAX
The kernel returns ERANGE when UINT64_MAX is passed. Create a mask and use UINT32_max, which is accepted, so that future bits will also be set.
This commit is contained in:
@@ -28,6 +28,8 @@ TEST(coredump_filter_mask_from_string) {
|
||||
uint64_t f;
|
||||
assert_se(coredump_filter_mask_from_string("default", &f) == 0);
|
||||
assert_se(f == COREDUMP_FILTER_MASK_DEFAULT);
|
||||
assert_se(coredump_filter_mask_from_string("all", &f) == 0);
|
||||
assert_se(f == COREDUMP_FILTER_MASK_ALL);
|
||||
|
||||
assert_se(coredump_filter_mask_from_string(" default\tdefault\tdefault ", &f) == 0);
|
||||
assert_se(f == COREDUMP_FILTER_MASK_DEFAULT);
|
||||
|
||||
Reference in New Issue
Block a user