From: Wolfgang Bumiller Date: Mon, 13 Nov 2023 11:17:43 +0000 (+0100) Subject: fix id mapping code X-Git-Url: https://git.proxmox.com/?p=pve-lxc-syscalld.git;a=commitdiff_plain;h=7ecf79161c1dc4f4e8499ec97965176dba827a89 fix id mapping code this is only used in the quotactl syscall which is not currently exposed in pve and only affected non-default mappings Signed-off-by: Wolfgang Bumiller --- diff --git a/src/process/id_map.rs b/src/process/id_map.rs index d61d489..2f71953 100644 --- a/src/process/id_map.rs +++ b/src/process/id_map.rs @@ -26,7 +26,7 @@ impl IdMap { pub fn map_from(&self, id: u64) -> Option { for entry in self.0.iter() { if entry.ns <= id && entry.ns + entry.range > id { - return Some(id + entry.host); + return Some(entry.host + id - entry.ns); } }