Eli Mesika has uploaded a new change for review. Change subject: core: force engine-config to run as root ......................................................................
core: force engine-config to run as root This patch forces engine-config to run as root. The --help can still be used from a regular user Change-Id: I42190236f29abe3c8af4fd4c83cca9abe54613e1 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1063901 Signed-off-by: Eli Mesika <emes...@redhat.com> --- M packaging/bin/engine-config.sh 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/12/25312/1 diff --git a/packaging/bin/engine-config.sh b/packaging/bin/engine-config.sh index eb4bb7d..3018ee8 100755 --- a/packaging/bin/engine-config.sh +++ b/packaging/bin/engine-config.sh @@ -70,12 +70,19 @@ esac done } + # do this in function so we do not lose $@ parseArgs "$@" [ -s "${CONF_FILE}" ] || die "Configuration file '${CONF_FILE}' is either empty or does not exist" . "${CONF_FILE}" +# Make sure only root can run our script +if [[ $EUID -ne 0 ]]; then + echo "This script must be run as root" 1>&2 + exit 1 +fi + # # Add this option to the java command line to enable remote debugging in # all IP addresses and port 8787: -- To view, visit http://gerrit.ovirt.org/25312 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I42190236f29abe3c8af4fd4c83cca9abe54613e1 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Eli Mesika <emes...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches