Allow using temporary directories on filesystems mounted noexec#1498
Allow using temporary directories on filesystems mounted noexec#1498moreati merged 1 commit intomitogen-hq:masterfrom
Conversation
Notes to self
f24f02b is origin of the code that rejects non-executable directories mitogen/ansible_mitogen/target.py Lines 280 to 282 in aa3199b Mitogen has no pre-existing test coverage of noexec. Ansible has a noexec test target https://github.com/ansible/ansible/tree/devel/test/integration/targets/noexec, introduced in ansible/ansible#72636 and backported to Ansible 2.9.
ThoughtsI can't conclusively say why David added noexec checks. I'm slightly tempted to build on this PR and remove them entirely. |
For completeness, do you have a citation or other evidence/references for this?
Ditto
I'm tempted to be more ruthless. What are your thoughts about removing the check entirely? |
None, just my own testing. Both Ansible and Ansible+Mitogen work fine on systems where everything writable for unprivileged users is mounted
I have not actually tested binary modules as I don't use them. However
That was my intention at first. I went the backwards compatibility route because as a one-off contributor I can't take the responsibility of introducing a breaking change. IMO, it's fine to remove the check. Users should not rely on Ansible-Mitogen to fix their temporary directory for them. Their setup should work when Mitogen is disabled. Let me know if you want me to change the PR to remove the check entirely. |
Yes please, and also
|
f05eef6 to
94a6e4b
Compare
Ok, done. |
Neither Ansible nor Mitogen need the temporary directory to be executable. Allow using noexec temporary directories so that mitogen-ansible can be used in environments where unpriviledged users are not allowed to have directories both writable and executable. Binary Ansible modules require the temporary directory to be executable. It's up to the user to make sure Ansible and their environement are configured correctly for this use case. Fixes mitogen-hq#632.
94a6e4b to
03d37da
Compare
|
Thank you. I expect to do a release later this week. |
Neither Ansible nor Mitogen need the temporary directory to be executable. Allow using noexec temporary directories so that mitogen-ansible can be used in environments where unpriviledged users are not allowed to have directories both writable and executable.
Binary Ansible modules require the temporary directory to be executable. It's up to the user to make sure Ansible and their environement are configured correctly for this use case.
In the situation where some candidate temporary directories are executable and some are not, the first executable one is preferred, for backwards compatibility.