Skip to content

Commit b6806f3

Browse files
authored
Make sure that security context files are readable by all (#1729)
Update internal/guest/runtime/hcsv2/uvm.go Make sure that security-context directory has `0755` permissions. Signed-off-by: Julien Maffre <[email protected]>
1 parent b2acb03 commit b6806f3

File tree

1 file changed

+2
-2
lines changed
  • internal/guest/runtime/hcsv2

1 file changed

+2
-2
lines changed

internal/guest/runtime/hcsv2/uvm.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,8 +454,8 @@ func (h *Host) CreateContainer(ctx context.Context, id string, settings *prot.VM
454454
if err != nil {
455455
return nil, fmt.Errorf("failed to create security context directory: %w", err)
456456
}
457-
// Make sure it's readable
458-
if err := os.Chmod(securityContextDir, 0744); err != nil {
457+
// Make sure that files inside directory are readable
458+
if err := os.Chmod(securityContextDir, 0755); err != nil {
459459
return nil, fmt.Errorf("failed to chmod security context directory: %w", err)
460460
}
461461

0 commit comments

Comments
 (0)