mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-27 15:57:09 +00:00
virtcontainers: change firecracker socket permissions
For security reasons, let's make sure 'others' don't have access to the firecracker hybrid vsock fixes #2101 Signed-off-by: Julio Montes <julio.montes@intel.com>
This commit is contained in:
parent
46d1957e0f
commit
8f6b0a6a41
@ -599,6 +599,11 @@ func (fc *firecracker) fcStartVM() error {
|
||||
return err
|
||||
}
|
||||
|
||||
// make sure 'others' don't have access to this socket
|
||||
if err := os.Chmod(filepath.Join(fc.jailerRoot, defaultHybridVSocketName), 0640); err != nil {
|
||||
return fmt.Errorf("Could not change socket permissions: %v", err)
|
||||
}
|
||||
|
||||
fc.state.set(vmReady)
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user