]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/ua_query.c
Add more ingres code
[bacula/bacula] / bacula / src / dird / ua_query.c
index 83d6cee13daa1b8bbe6ae468a9c3dcd7882ae75a..354b596b4910a42b6280f0419022c62443d364c9 100644 (file)
    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
-   License as published by the Free Software Foundation plus additions
-   that are listed in the file LICENSE.
+   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.
 
    This program is distributed in the hope that it will be useful, but
    WITHOUT ANY WARRANTY; without even the implied warranty of
    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);