]> git.proxmox.com Git - pve-lxc-syscalld.git/commitdiff
fix id mapping code master
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 13 Nov 2023 11:17:43 +0000 (12:17 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 14 Nov 2023 08:04:31 +0000 (09:04 +0100)
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 <w.bumiller@proxmox.com>
src/process/id_map.rs

index d61d489da7af7418908fd8d85f1660c435b7c73e..2f71953075eedca54254ed8d6c27db71f6a20120 100644 (file)
@@ -26,7 +26,7 @@ impl IdMap {
     pub fn map_from(&self, id: u64) -> Option<u64> {
         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);
             }
         }