chdir to original directory after setns #137

Merged
merged 1 commit into from Sep 13, 2016

Conversation

Projects
None yet
3 participants
Collaborator

zyga commented Sep 13, 2016

This patch fixes snap-confine's current working directory after a
successful setns call. This apparently a little undocumented but setns
coupled with CLONE_NEWNS resets the current working directory to the
root directory.

This patch is a quick reaction, I will refactor all cwd management code
with a separate branch as currently too many things need to care about
it.

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

chdir to original directory after setns
This patch fixes snap-confine's current working directory after a
successful setns call. This apparently a little undocumented but setns
coupled with CLONE_NEWNS resets the current working directory to the
root directory.

This patch is a quick reaction, I will refactor all cwd management code
with a separate branch as currently too many things need to care about
it.

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

chipaca commented Sep 13, 2016

👍

Contributor

jdstrand commented Sep 13, 2016

This patch looks fine though where is /var/lib/snapd/void created?

Collaborator

zyga commented Sep 13, 2016

@jdstrand it is created by make install (it is also appropriately managed by packaging)

@zyga zyga merged commit 6bd5c4a into master Sep 13, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@zyga zyga deleted the fix-cwd-after-setns branch Sep 13, 2016

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