Skip to content

Commit 0ad9920

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Always setup rootwrap sudoers entry"
2 parents fda9df8 + d2f8fa3 commit 0ad9920

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Ken Pepple <ken.pepple@rabbityard.com>
2626
Kiall Mac Innes <kiall@managedit.ie>
2727
Russell Bryant <rbryant@redhat.com>
2828
Scott Moser <smoser@ubuntu.com>
29+
Thierry Carrez <thierry@openstack.org>
2930
Todd Willey <xtoddx@gmail.com>
3031
Tres Henry <tres@treshenry.net>
3132
Vishvananda Ishaya <vishvananda@gmail.com>

stack.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -187,13 +187,6 @@ else
187187
sudo chown root:root $TEMPFILE
188188
sudo mv $TEMPFILE /etc/sudoers.d/50_stack_sh
189189

190-
# Set up the rootwrap sudoers
191-
TEMPFILE=`mktemp`
192-
echo "$USER ALL=(root) NOPASSWD: $NOVA_ROOTWRAP" >$TEMPFILE
193-
chmod 0440 $TEMPFILE
194-
sudo chown root:root $TEMPFILE
195-
sudo mv $TEMPFILE /etc/sudoers.d/nova-rootwrap
196-
197190
# Remove old file
198191
sudo rm -f /etc/sudoers.d/stack_sh_nova
199192
fi
@@ -1189,6 +1182,13 @@ sudo chown `whoami` $NOVA_CONF_DIR
11891182

11901183
cp -p $NOVA_DIR/etc/nova/policy.json $NOVA_CONF_DIR
11911184

1185+
# Set up the rootwrap sudoers
1186+
TEMPFILE=`mktemp`
1187+
echo "$USER ALL=(root) NOPASSWD: $NOVA_ROOTWRAP" >$TEMPFILE
1188+
chmod 0440 $TEMPFILE
1189+
sudo chown root:root $TEMPFILE
1190+
sudo mv $TEMPFILE /etc/sudoers.d/nova-rootwrap
1191+
11921192
if is_service_enabled n-api; then
11931193
# Use the sample http middleware configuration supplied in the
11941194
# Nova sources. This paste config adds the configuration required

0 commit comments

Comments
 (0)