Merge lp:~kissiel/checkbox/fix-1569575-root-leftovers-crash into lp:checkbox
Proposed by
Maciej Kisielewski
Status: | Merged |
---|---|
Approved by: | Maciej Kisielewski |
Approved revision: | 4316 |
Merged at revision: | 4324 |
Proposed branch: | lp:~kissiel/checkbox/fix-1569575-root-leftovers-crash |
Merge into: | lp:checkbox |
Diff against target: |
33 lines (+14/-9) 1 file modified
plainbox/plainbox/impl/ctrl.py (+14/-9) |
To merge this branch: | bzr merge lp:~kissiel/checkbox/fix-1569575-root-leftovers-crash |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Sylvain Pineau (community) | Approve | ||
Review via email: mp+293041@code.launchpad.net |
Description of the change
This patch handles PermissionError exceptions coming from TemporaryDirectory.
Consider a job, that is run as root that runs cp somedir .
When the temp cwd context manager is left, the cleanup is run as the user
running plainbox, not root. This caused plainbox to crashed.
This patch makes plainbox display a warning and proceed.
9ca20ea plainbox:ctrl: catch tempcwd errors and print warning
To post a comment you must log in.
I'm ok with the patch, doing the cleanup as root from python is 1. not easy and 2. if it was possible from plainbox it would open the door to all sort of arbitrary commands being run as root. So +1 to log a warning and proceed. thanks