Skip to content

Commit b99107a

Browse files
committed
fix(mount): apply chmod to correct destination path
Signed-off-by: Ayush <ayushsrisks@gmail.com>
1 parent 7777b4a commit b99107a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/unikontainers/mount.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func createTmpfs(monRootfs string, path string, flags uint64, mode string, size
6464

6565
if mode == "1777" {
6666
// sonarcloud:go:S2612 -- This is a tmpfs mount point, sticky bit 1777 is required (like /tmp), controlled path, safe by design
67-
err := os.Chmod(path, 01777) // NOSONAR
67+
err := os.Chmod(dstPath, 01777) // NOSONAR
6868
if err != nil {
6969
return fmt.Errorf("failed to chmod %s: %w", path, err)
7070
}

0 commit comments

Comments
 (0)