From 52bc57e1650e28ff93fd48fab9e828fe500a8285 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Thu, 19 Jun 2008 19:39:41 +0000 Subject: [PATCH] kes Add dbuser to DIR conf file (replaces user). kes Add --with-db-password to ./configure kes Fix regress to handle db_password. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7183 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/autoconf/configure.in | 10 ++++++++++ bacula/configure | 18 +++++++++++++++++- bacula/src/dird/bacula-dir.conf.in | 2 +- bacula/src/dird/dird_conf.c | 1 + bacula/technotes-2.5 | 3 +++ 5 files changed, 32 insertions(+), 2 deletions(-) diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index 5c488bdc2f..fbe179b313 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -1241,6 +1241,16 @@ AC_ARG_WITH(db_user, ) AC_SUBST(db_user) +db_password= +AC_ARG_WITH(db_password, + [ --with-db-password=UNAME specify database password (default *none*)], + [ + if test "x$withval" != "x" ; then + db_password=$withval + fi + ] +) +AC_SUBST(db_password) # # Handle users and groups for each daemon diff --git a/bacula/configure b/bacula/configure index ed189417b3..565f72d116 100755 --- a/bacula/configure +++ b/bacula/configure @@ -823,6 +823,7 @@ mon_fd_password mon_sd_password db_name db_user +db_password dir_user dir_group sd_user @@ -1513,6 +1514,7 @@ Optional Packages: --with-mon-sd-password=PASSWORD specify Storage daemon's password used by the monitor --with-db-name=DBNAME specify database name (default bacula) --with-db-user=UNAME specify database user (default bacula) + --with-db-password=UNAME specify database password (default *none*) --with-dir-user=USER specify user for Director daemon --with-dir-group=GROUP specify group for Director daemon --with-sd-user=USER specify user for Storage daemon @@ -17063,6 +17065,19 @@ fi +db_password= + +# Check whether --with-db_password was given. +if test "${with_db_password+set}" = set; then + withval=$with_db_password; + if test "x$withval" != "x" ; then + db_password=$withval + fi + + +fi + + # # Handle users and groups for each daemon @@ -31493,6 +31508,7 @@ mon_fd_password!$mon_fd_password$ac_delim mon_sd_password!$mon_sd_password$ac_delim db_name!$db_name$ac_delim db_user!$db_user$ac_delim +db_password!$db_password$ac_delim dir_user!$dir_user$ac_delim dir_group!$dir_group$ac_delim sd_user!$sd_user$ac_delim @@ -31534,7 +31550,7 @@ DISTVER!$DISTVER$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 58; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 59; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 diff --git a/bacula/src/dird/bacula-dir.conf.in b/bacula/src/dird/bacula-dir.conf.in index c39f672118..b39bd408d0 100644 --- a/bacula/src/dird/bacula-dir.conf.in +++ b/bacula/src/dird/bacula-dir.conf.in @@ -233,7 +233,7 @@ Catalog { Name = MyCatalog # Uncomment the following line if you want the dbi driver # dbdriver = "dbi:mysql"; dbaddress = 127.0.0.1; dbport = 3306 - dbname = @db_name@; user = @db_user@; password = "" + dbname = "@db_name@"; dbuser = "@db_user@"; dbpassword = "@db_password@" } # Reasonable message delivery -- send most everything to email address diff --git a/bacula/src/dird/dird_conf.c b/bacula/src/dird/dird_conf.c index d4649d4ad7..fa9e345684 100644 --- a/bacula/src/dird/dird_conf.c +++ b/bacula/src/dird/dird_conf.c @@ -245,6 +245,7 @@ static RES_ITEM cat_items[] = { /* keep this password as store_str for the moment */ {"password", store_str, ITEM(res_cat.db_password), 0, 0, 0}, {"dbpassword", store_str, ITEM(res_cat.db_password), 0, 0, 0}, + {"dbuser", store_str, ITEM(res_cat.db_user), 0, 0, 0}, {"user", store_str, ITEM(res_cat.db_user), 0, 0, 0}, {"dbname", store_str, ITEM(res_cat.db_name), 0, ITEM_REQUIRED, 0}, {"dbdriver", store_str, ITEM(res_cat.db_driver), 0, 0, 0}, diff --git a/bacula/technotes-2.5 b/bacula/technotes-2.5 index ce53fbf22a..ac626dbe80 100644 --- a/bacula/technotes-2.5 +++ b/bacula/technotes-2.5 @@ -26,6 +26,9 @@ vtape driver General: 19Jun08 +kes Add dbuser to DIR conf file (replaces user). +kes Add --with-db-password to ./configure +kes Fix regress to handle db_password. ebl Add new "status storage slots" that list autochanger content. ebl Update vtape driver to compile only under linux. -- 2.39.5