mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-26 02:05:02 +00:00
nixos/security.wrappers: include CAP_LAST_CAP when raising ambient capabilities
(cherry picked from commit dfba3a7bc1)
This commit is contained in:
committed by
github-actions[bot]
parent
0fc26a9f32
commit
9a49e60e28
@@ -116,7 +116,7 @@ static int make_caps_ambient(const char *self_path) {
|
||||
return 1;
|
||||
}
|
||||
uint64_t set = user_data[0].permitted | (uint64_t)user_data[1].permitted << 32;
|
||||
for (unsigned cap = 0; cap < last_cap; cap++) {
|
||||
for (unsigned cap = 0; cap <= last_cap; cap++) {
|
||||
if (!(set & (1ULL << cap))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user