Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support executable templates on filesystems mounted with noexec #1383

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

nabertrand
Copy link
Contributor

Summary

Use File::Stat.executable? instead of File.executable? when checking if template files have the execute bit to support filesystems mounted with noexec.

Additional Context

If the default temp directory is mounted with the noexec flag, PDK::Util::Filesystem.executable? will return false regardless of the execute mode bits. Using File::Stat.executable? instead correctly determines if the file has the execute bit set.

Checklist

  • 🟢 Spec tests.
  • 🟢 Acceptance tests.
  • Manually verified.

@nabertrand nabertrand requested a review from a team as a code owner August 6, 2024 04:51
@nabertrand nabertrand force-pushed the executable_templates_fix branch from 8472752 to 58ff660 Compare August 6, 2024 04:57
@nabertrand nabertrand force-pushed the executable_templates_fix branch from 58ff660 to 7189ddf Compare August 6, 2024 13:38
@jordanbreen28 jordanbreen28 merged commit ecab428 into puppetlabs:main Aug 6, 2024
6 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants