Merge lp://qastaging/~mterry/snap-confine/tmpdir into lp://qastaging/~snappy-dev/snap-confine/trunk
Proposed by
Michael Terry
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | John Lenton | ||||
Approved revision: | 70 | ||||
Merged at revision: | 68 | ||||
Proposed branch: | lp://qastaging/~mterry/snap-confine/tmpdir | ||||
Merge into: | lp://qastaging/~snappy-dev/snap-confine/trunk | ||||
Prerequisite: | lp://qastaging/~mterry/snap-confine/fix-tests | ||||
Diff against target: |
71 lines (+45/-2) 2 files modified
src/main.c (+11/-2) tests/test_tmpdir (+34/-0) |
||||
To merge this branch: | bzr merge lp://qastaging/~mterry/snap-confine/tmpdir | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
John Lenton (community) | Approve | ||
Review via email: mp+260620@code.qastaging.launchpad.net |
Commit message
Fix propagation of TMPDIR from the launcher to the command being run.
Description of the change
Fix propagation of TMPDIR from the launcher to the command being run.
Our logic for making sure that TMPDIR exists iterated over the return value of getenv("TMPDIR") with strtok. But strtok modifies its argument. And getenv returns the real environment memory used, so modifications there actually change your environment.
The end result is that we were emptying TMPDIR while making it.
I've also fixed a bug that caused us to stop trying to make TMPDIR if any piece of it (above /tmp) already existed (like, /tmp/snaps/!).
And of course, a test.
To post a comment you must log in.