Yedidyah Bar David has uploaded a new change for review. Change subject: packaging: engine-backup: Stricter credentials options checks ......................................................................
packaging: engine-backup: Stricter credentials options checks Do not allow passing credentials options without --change-*credentials. Change-Id: Id7cb0e61e9184b9ebed24c2584ce1317541644f3 Bug-Url: https://bugzilla.redhat.com/1212526 Signed-off-by: Yedidyah Bar David <d...@redhat.com> --- M packaging/bin/engine-backup.sh 1 file changed, 24 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/87/41087/1 diff --git a/packaging/bin/engine-backup.sh b/packaging/bin/engine-backup.sh index 606be7d..56f78d9 100755 --- a/packaging/bin/engine-backup.sh +++ b/packaging/bin/engine-backup.sh @@ -617,6 +617,14 @@ die "--db-passfile or --db-password is missing" [ -n "${MY_DB_DATABASE}" ] || die "--db-name is missing" fi + [ -z "${CHANGE_DB_CREDENTIALS}" -a \ + \( \ + -n "${MY_DB_HOST}" \ + -o -n "${MY_DB_USER}" \ + -o -n "${MY_DB_PASSWORD}" \ + -o -n "${MY_DB_DATABASE}" \ + \) \ + ] && die "Please use --change-db-credentials to change engine db credentials" if [ -n "${CHANGE_DWH_DB_CREDENTIALS}" ]; then [ -n "${PROVISION_DWH_DB}" ] && die "Cannot change credentials if provisioning a database" [ -n "${MY_DWH_DB_HOST}" ] || die "--dwh-db-host is missing" @@ -625,6 +633,14 @@ die "--dwh-db-passfile or --dwh-db-password is missing" [ -n "${MY_DWH_DB_DATABASE}" ] || die "--dwh-db-name is missing" fi + [ -z "${CHANGE_DWH_DB_CREDENTIALS}" -a \ + \( \ + -n "${MY_DWH_DB_HOST}" \ + -o -n "${MY_DWH_DB_USER}" \ + -o -n "${MY_DWH_DB_PASSWORD}" \ + -o -n "${MY_DWH_DB_DATABASE}" \ + \) \ + ] && die "Please use --change-dwh-db-credentials to change dwh db credentials" if [ -n "${CHANGE_REPORTS_DB_CREDENTIALS}" ]; then [ -n "${PROVISION_REPORTS_DB}" ] && die "Cannot change credentials if provisioning a database" [ -n "${MY_REPORTS_DB_HOST}" ] || die "--reports-db-host is missing" @@ -633,6 +649,14 @@ die "--reports-db-passfile or --reports-db-password is missing" [ -n "${MY_REPORTS_DB_DATABASE}" ] || die "--reports-db-name is missing" fi + [ -z "${CHANGE_REPORTS_DB_CREDENTIALS}" -a \ + \( \ + -n "${MY_REPORTS_DB_HOST}" \ + -o -n "${MY_REPORTS_DB_USER}" \ + -o -n "${MY_REPORTS_DB_PASSWORD}" \ + -o -n "${MY_REPORTS_DB_DATABASE}" \ + \) \ + ] && die "Please use --change-reports-db-credentials to change reports db credentials" } # Expects user/host/port/database in the environment. -- To view, visit https://gerrit.ovirt.org/41087 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id7cb0e61e9184b9ebed24c2584ce1317541644f3 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Yedidyah Bar David <d...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches