From bcfa6a7865a4461b5240f1bcb57504de4589811d Mon Sep 17 00:00:00 2001 From: Stephen Fromm Date: Sun, 22 Apr 2012 00:14:40 -0700 Subject: [PATCH] Add another example to file_secontext.yml Demonstrate what happens when there is no default context in the policy. --- examples/playbooks/file_secontext.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/playbooks/file_secontext.yml b/examples/playbooks/file_secontext.yml index 75ab6ad49a..117a930dc0 100644 --- a/examples/playbooks/file_secontext.yml +++ b/examples/playbooks/file_secontext.yml @@ -9,4 +9,10 @@ action: file path=/etc/exports seuser=unconfined_u - name: Set selinux context back to default value action: file path=/etc/exports context=default - + - name: Create empty file + action: command /bin/touch /tmp/foo + - name: Change setype of /tmp/foo + action: file path=/tmp/foo setype=default_t + - name: Try to set secontext to default, but this will fail + because of the lack of a default in the policy + action: file path=/tmp/foo context=default