diff options
author | Francisco Redondo Marchena <francisco.marchena@codethink.co.uk> | 2014-11-18 15:32:53 +0000 |
---|---|---|
committer | Francisco Redondo Marchena <francisco.marchena@codethink.co.uk> | 2015-02-11 18:30:28 +0000 |
commit | 99b3f43c68ef2885a07b0d6e5e2f91684d12816b (patch) | |
tree | cf35a90a4e36326b87f152b99d8c7917fbf3d855 /openstack-nova.configure | |
parent | 6f4ee430ec906b51a3ec8de81382f206ea1ab32f (diff) | |
download | definitions-99b3f43c68ef2885a07b0d6e5e2f91684d12816b.tar.gz |
FIXUPME: do not write into sudoers directly but create a file in its folder
Diffstat (limited to 'openstack-nova.configure')
-rw-r--r-- | openstack-nova.configure | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/openstack-nova.configure b/openstack-nova.configure index ee937007..0a4d7505 100644 --- a/openstack-nova.configure +++ b/openstack-nova.configure @@ -66,4 +66,6 @@ sed -i "s/192\.168\.122\./192\.168\.1\./g" \ # Add nova to sudoers controlling which commands is running as a root # using the openstack rootwrap. ########################################################################## -echo 'nova ALL=(ALL) NOPASSWD: /usr/bin/nova-rootwrap /etc/nova/rootwrap.conf *' >> "$ROOT/etc/sudoers" +install -D -m 0440 /proc/self/fd/0 <<'EOF' "$ROOT"/etc/sudoers.d/nova-rootwrap +nova ALL=(root) NOPASSWD: /usr/bin/nova-rootwrap /etc/nova/rootwrap.conf * +EOF |