From da72fc9d52426319154b5b32b8a8adb86efacad7 Mon Sep 17 00:00:00 2001 From: Colin Date: Mon, 2 Sep 2024 20:36:37 +0000 Subject: [PATCH] bunpen: fix typo that prevented assigning caps >= 32 --- pkgs/additional/bunpen/rt/ext/capabilities.ha | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/additional/bunpen/rt/ext/capabilities.ha b/pkgs/additional/bunpen/rt/ext/capabilities.ha index e30fa7906..1d02f66c1 100644 --- a/pkgs/additional/bunpen/rt/ext/capabilities.ha +++ b/pkgs/additional/bunpen/rt/ext/capabilities.ha @@ -358,11 +358,11 @@ export fn capset(eff: caps, prm: caps, inh: caps) (void | rt::errno) = { // the API has some legacy such that we have to provide the lower 32 caps and // the upper 32 separately: let eff_lo = (eff & 0xFFFFFFFF): u32; - let eff_hi = ((eff << 32) & 0xFFFFFFFF): u32; + let eff_hi = ((eff >> 32) & 0xFFFFFFFF): u32; let prm_lo = (prm & 0xFFFFFFFF): u32; - let prm_hi = ((prm << 32) & 0xFFFFFFFF): u32; + let prm_hi = ((prm >> 32) & 0xFFFFFFFF): u32; let inh_lo = (inh & 0xFFFFFFFF): u32; - let inh_hi = ((inh << 32) & 0xFFFFFFFF): u32; + let inh_hi = ((inh >> 32) & 0xFFFFFFFF): u32; let data: [2]user_cap_data = [ (user_cap_data { effective = eff_lo,