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

tests/lib/reset: restore context of removed snapd directories #6248

Merged

Conversation

bboozzoo
Copy link
Collaborator

SELinux context of filesystem objects is the same as their parent. Once the top
level snapd directories are purged and remade, they will end up with a context
that stems off respective parent directories, which can end up being var_t,
var_lib_t (or even root_t if /snap was used). Make sure to restore the context
of these locations according to our targeted policy.

SELinux context of filesystem objects is the same as their parent. Once the top
level snapd directories are purged and remade, they will end up with a context
that stems off respective parent directories, which can end up being var_t,
var_lib_t (or even root_t if /snap was used). Make sure to restore the context
of these locations according to our targeted policy.

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
@@ -61,6 +61,12 @@ reset_classic() {
exit 1
fi

case "$SPREAD_SYSTEM" in
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please add a short comment to explain that line?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added now.

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
@bboozzoo bboozzoo added the Simple 😃 A small PR which can be reviewed quickly label Dec 3, 2018
@bboozzoo bboozzoo merged commit 9fdae43 into snapcore:master Dec 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Simple 😃 A small PR which can be reviewed quickly
Projects
None yet
3 participants