From 6fe0fb92f84dce7665d4bc56d184d4c67bfcccf7 Mon Sep 17 00:00:00 2001 From: Joerg Steffens Date: Fri, 19 Dec 2014 17:45:28 +0100 Subject: [PATCH] Debian: fixes migrating from psql with password Prevents a problem if migrating from a version without dbconfig to a version with dbconfig and have a postgresql database with password access. --- debian/bareos-database-common.config.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/debian/bareos-database-common.config.in b/debian/bareos-database-common.config.in index 573285ca2b6..d18b3fb3a18 100644 --- a/debian/bareos-database-common.config.in +++ b/debian/bareos-database-common.config.in @@ -57,6 +57,11 @@ if [ -r @scriptdir@/bareos-config-lib.sh ]; then dbc_load_include="sh:/usr/lib/bareos/scripts/set_dbconfig_vars.sh" # empty passwords require special treatment, see below bareos_database_password=`get_database_password` || true + # if password is given, set authmethod to password, + # otherwise postgresql configuration will stay at default ident + if [ "${bareos_database_password}" ]; then + dbc_authmethod_user="password" + fi fi ;; *)