Skip to content

Commit edff037

Browse files
AyushSriv06urunc-bot[bot]
authored andcommitted
fix(mount): ensure correct destination path for chmod
PR: #456 Signed-off-by: Ayush <ayushsrisks@gmail.com> Reviewed-by: Charalampos Mainas <cmainas@nubificus.co.uk> Approved-by: Charalampos Mainas <cmainas@nubificus.co.uk>
1 parent 944e06b commit edff037

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)