Eliminate use of sudo for two things that don't need it
The MySQL restore strategy used exec_with_root_helper() which was a
skinny wrapper on execute with sudo to find out whether MySQL was up
and running or not. This is unnecessary as any user can run mysqladmin
(by default) and similarly, any user can run ps (not only root).
Since these two code paths were the only ones that used
exec_with_root_helper() I've eliminated that as well. It didn't do
something so profound that its loss will be missed anyway.
Reviewed: https:/ /review. openstack. org/128781 /git.openstack. org/cgit/ openstack/ trove/commit/ ?id=1f84823fb1b aea9ece5fe3df52 c2fa317cadbcc5
Committed: https:/
Submitter: Jenkins
Branch: master
commit 1f84823fb1baea9 ece5fe3df52c2fa 317cadbcc5
Author: Amrith Kumar <email address hidden>
Date: Wed Oct 15 18:35:19 2014 -0400
Eliminate use of sudo for two things that don't need it
The MySQL restore strategy used exec_with_ root_helper( ) which was a
skinny wrapper on execute with sudo to find out whether MySQL was up
and running or not. This is unnecessary as any user can run mysqladmin
(by default) and similarly, any user can run ps (not only root).
Since these two code paths were the only ones that used with_root_ helper( ) I've eliminated that as well. It didn't do
exec_
something so profound that its loss will be missed anyway.
Change-Id: Ia0452417b88416 b0289f894b99a86 32ab0328539
Closes-Bug: #1350075