cmd/snap-confine: set TMPDIR and TEMPDIR each time #3188

Merged
merged 1 commit into from Apr 13, 2017

Conversation

Projects
None yet
3 participants
Contributor

zyga commented Apr 13, 2017

We used to set TMPDIR and TEMPDIR and point them at /tmp when
constructing the mount namespace (the code was simply next to the code
that creates private /tmp) but after the move to per-snap persistent
namespaces the logic was unchanged. This means that the two variables
were set only the first time a given snap application was launched.

This patch corrects this by setting all environment in one place, right
next to the existing code that changes PATH.

Signed-off-by: Zygmunt Krynicki zygmunt.krynicki@canonical.com

cmd/snap-confine: set TMPDIR and TEMPDIR each time
We used to set TMPDIR and TEMPDIR and point them at /tmp when
constructing the mount namespace (the code was simply next to the code
that creates private /tmp) but after the move to per-snap persistent
namespaces the logic was unchanged. This means that the two variables
were set only the first time a given snap application was launched.

This patch corrects this by setting all environment in one place, right
next to the existing code that changes PATH.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

@zyga zyga merged commit 1a7d9c4 into snapcore:master Apr 13, 2017

3 of 6 checks passed

xenial-amd64 autopkgtest running
Details
xenial-ppc64el autopkgtest running
Details
yakkety-amd64 autopkgtest running
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
xenial-i386 autopkgtest finished (success)
Details
zesty-amd64 autopkgtest finished (success)
Details

@zyga zyga deleted the zyga:fix-tmp-handling branch Apr 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment