X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fdird%2Fua_query.c;h=354b596b4910a42b6280f0419022c62443d364c9;hb=c5f4a68937116a768e6d85bc576a5fd41a56e93a;hp=bd3202e300f76b2b3824306a5dcf1a1f679a465b;hpb=eb326beecb6fc8803ab73e6395c68c5a29ac8cc2;p=bacula%2Fbacula diff --git a/bacula/src/dird/ua_query.c b/bacula/src/dird/ua_query.c index bd3202e300..354b596b49 100644 --- a/bacula/src/dird/ua_query.c +++ b/bacula/src/dird/ua_query.c @@ -14,7 +14,7 @@ The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. This program is Free Software; you can redistribute it and/or - modify it under the terms of version two of the GNU General Public + modify it under the terms of version three of the GNU Affero General Public License as published by the Free Software Foundation and included in the file LICENSE. @@ -23,12 +23,12 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Affero General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - Bacula® is a registered trademark of John Walker. + Bacula® is a registered trademark of Kern Sibbald. The licensor of Bacula is the Free Software Foundation Europe (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich, Switzerland, email:ftf@fsfeurope.org. @@ -69,8 +69,9 @@ int querycmd(UAContext *ua, const char *cmd) goto bail_out; } if ((fd=fopen(query_file, "rb")) == NULL) { + berrno be; ua->error_msg(_("Could not open %s: ERR=%s\n"), query_file, - strerror(errno)); + be.bstrerror()); goto bail_out; } @@ -207,7 +208,7 @@ static POOLMEM *substitute_prompts(UAContext *ua, } len = strlen(ua->cmd); p = (char *)malloc(len * 2 + 1); - db_escape_string(p, ua->cmd, len); + db_escape_string(ua->jcr, ua->db, p, ua->cmd, len); subst[n] = p; olen = o - new_query; new_query = check_pool_memory_size(new_query, olen + strlen(p) + 10);