Skip to content

Commit 149a609

Browse files
Matt Willsherannawake
Matt Willsher
authored andcommitted
SELinux should be permissive. It's the same as disabled but can also
generate dry runs of policy violations.
1 parent 66d129a commit 149a609

File tree

7 files changed

+7
-13
lines changed

7 files changed

+7
-13
lines changed

AUTHORS

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Joshua Timberman <[email protected]>
99
Jeremy Rosengren <[email protected]>
1010
Lorenzo Villani <[email protected]>
1111
Masahiro Ono <[email protected]>
12+
Matt Willsher <[email protected]>
1213
Mischa Taylor <[email protected]>
1314
Rickard von Essen <[email protected]>
1415
Ross Smith II <[email protected]>

http/ks5.cfg

+1-4
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ cdrom
2626
user --name=vagrant --password vagrant
2727
network --bootproto=dhcp
2828
firewall --disabled
29-
selinux --disabled
29+
selinux --permissive
3030
bootloader --location=mbr
3131
text
3232
skipx
@@ -81,9 +81,6 @@ nfs-utils
8181
-zd1211-firmware
8282

8383
%post
84-
# Force disable SELinux
85-
cp /etc/selinux/config /etc/selinux/config.orig
86-
sed -i -e 's/\(^SELINUX=\).*$/\1disabled/' /etc/selinux/config
8784
# configure vagrant user in sudoers
8885
echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
8986
sed -i "s/^\(.*requiretty\)$/#\1/" /etc/sudoers

http/ks6-desktop.cfg

+1-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ user --name=vagrant --plaintext --password vagrant
2727
unsupported_hardware
2828
network --bootproto=dhcp
2929
firewall --disabled
30-
selinux --disabled
30+
selinux --permissive
3131
bootloader --location=mbr
3232
text
3333
xconfig --startxonboot --resolution=1024x76 --depth=24
@@ -71,8 +71,6 @@ curl
7171
wget
7272

7373
%post
74-
# Force disable SELinux
75-
sed -i -e 's/\(^SELINUX=\).*$/\1disabled/' /etc/selinux/config
7674
# configure vagrant user in sudoers
7775
echo "%vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant
7876
chmod 0440 /etc/sudoers.d/vagrant

http/ks6.cfg

+1-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ user --name=vagrant --plaintext --password vagrant
2727
unsupported_hardware
2828
network --bootproto=dhcp
2929
firewall --disabled
30-
selinux --disabled
30+
selinux --permissive
3131
bootloader --location=mbr
3232
text
3333
skipx
@@ -74,8 +74,6 @@ nfs-utils
7474
%end
7575

7676
%post
77-
# Force disable SELinux
78-
sed -i -e 's/\(^SELINUX=\).*$/\1disabled/' /etc/selinux/config
7977
# configure vagrant user in sudoers
8078
echo "%vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant
8179
chmod 0440 /etc/sudoers.d/vagrant

http/ks7-desktop.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ user --name=vagrant --plaintext --password vagrant
2727
unsupported_hardware
2828
network --bootproto=dhcp
2929
firewall --disabled
30-
selinux --disabled
30+
selinux --permissive
3131
bootloader --location=mbr
3232
text
3333
xconfig --startxonboot --defaultdesktop=gnome

http/ks7.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ user --name=vagrant --plaintext --password vagrant
2727
unsupported_hardware
2828
network --bootproto=dhcp
2929
firewall --disabled
30-
selinux --disabled
30+
selinux --permissive
3131
bootloader --location=mbr
3232
text
3333
skipx

test/centos_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
end
1515

1616
it 'should disable SELinux' do
17-
expect(selinux).to be_disabled
17+
expect(selinux).to be_permissive
1818
end
1919

2020
# https://www.chef.io/blog/2015/02/26/bento-box-update-for-centos-and-fedora/

0 commit comments

Comments
 (0)