Do not copy host sudoers in guest.
As noticed by Dmitry Nedospasov (Cf. [1]), sudoers file should not be copied by default. Move this hook to a role, and add a warning about this in role. [1] http://xen-tools.org/pipermail/xen-tools-dev/2010-July/000146.html
This commit is contained in:
committed by
Dmitry Nedospasov
parent
97ecedde5f
commit
77a3876cbe
@@ -31,29 +31,6 @@ cp /etc/timezone ${prefix}/etc
|
||||
cp /etc/localtime ${prefix}/etc
|
||||
|
||||
|
||||
#
|
||||
# If the host has sudo then copy the configuration file, and install
|
||||
# the package
|
||||
#
|
||||
if [ -e /etc/sudoers ]; then
|
||||
|
||||
logMessage Installing SUDO too.
|
||||
|
||||
#
|
||||
# Copy file and fixup permissions.
|
||||
#
|
||||
cp /etc/sudoers ${prefix}/etc
|
||||
chown root:root ${prefix}/etc/sudoers
|
||||
chmod 440 ${prefix}/etc/sudoers
|
||||
|
||||
#
|
||||
# Install sudo
|
||||
#
|
||||
installDebianPackage ${prefix} sudo
|
||||
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
# Log our finish
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user