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

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

Merged
merged 1 commit into from Apr 13, 2017

Conversation

zyga
Copy link
Collaborator

@zyga 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

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
@zyga zyga deleted the fix-tmp-handling branch April 13, 2017 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants