Skip to content

Commit

Permalink
should set exec bit for runc temp file
Browse files Browse the repository at this point in the history
Signed-off-by: lifubang <lifubang@acmcoder.com>
  • Loading branch information
lifubang committed Oct 13, 2024
1 parent 9112335 commit e2647bd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libcontainer/dmz/cloned_binary_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ func mktemp(dir string) (*os.File, SealFunc, error) {
if err != nil {
return nil, nil, err
}
if err := file.Chmod(0o511); err != nil {
return nil, nil, fmt.Errorf("chmod classic tmpfile: %w", err)
}
// Unlink the file and verify it was unlinked.
if err := os.Remove(file.Name()); err != nil {
return nil, nil, fmt.Errorf("unlinking classic tmpfile: %w", err)
Expand Down

0 comments on commit e2647bd

Please sign in to comment.