Skip to content
/ incus Public
forked from lxc/incus

Commit

Permalink
incusd/device: Update for SetUserns change
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
  • Loading branch information
stgraber committed Sep 13, 2023
1 parent 5808bbf commit e0ba62c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions incusd/device/device_utils_disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,8 @@ func DiskVMVirtfsProxyStart(execPath string, pidPath string, sharePath string, i
}

if len(idmaps) > 0 {
proc.SetUserns(&idmap.IdmapSet{Idmap: idmaps})
idmapSet := &idmap.IdmapSet{Idmap: idmaps}
proc.SetUserns(idmapSet.ToUidMappings(), idmapSet.ToGidMappings())
}

err = proc.StartWithFiles(context.Background(), []*os.File{acceptFile})
Expand Down Expand Up @@ -503,7 +504,8 @@ func DiskVMVirtiofsdStart(execPath string, inst instance.Instance, socketPath st
}

if len(idmaps) > 0 {
proc.SetUserns(&idmap.IdmapSet{Idmap: idmaps})
idmapSet := &idmap.IdmapSet{Idmap: idmaps}
proc.SetUserns(idmapSet.ToUidMappings(), idmapSet.ToGidMappings())
}

err = proc.StartWithFiles(context.Background(), []*os.File{unixFile})
Expand Down

0 comments on commit e0ba62c

Please sign in to comment.