]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/ua_run.c
Fix line I accidently truncated
[bacula/bacula] / bacula / src / dird / ua_run.c
index d28ef51feea413198220cbd4a00ebd424c51f280..9da828ad0659e0e3d60b62c06099a6a7bf84bff2 100644 (file)
@@ -9,7 +9,7 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2001-2006 Free Software Foundation Europe e.V.
+   Copyright (C) 2001-2007 Free Software Foundation Europe e.V.
 
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
@@ -105,7 +105,7 @@ int run_cmd(UAContext *ua, const char *cmd)
 
 #define YES_POS 14
 
-   if (!open_db(ua)) {
+   if (!open_client_db(ua)) {
       return 1;
    }
 
@@ -322,6 +322,10 @@ int run_cmd(UAContext *ua, const char *cmd)
             bsendmsg(ua, _("Catalog \"%s\" not found\n"), catalog_name);
            return 0;
        }
+       if (!acl_access_ok(ua, Catalog_ACL, catalog->name())) {
+          bsendmsg(ua, _("No authorization. Catalog \"%s\".\n"), catalog->name());
+          return 0;
+       }
    }
    Dmsg1(800, "Using catalog=%s\n", NPRT(catalog_name));
 
@@ -455,12 +459,15 @@ int run_cmd(UAContext *ua, const char *cmd)
     */
    jcr = new_jcr(sizeof(JCR), dird_free_jcr);
    set_jcr_defaults(jcr, job);
+   jcr->unlink_bsr = ua->jcr->unlink_bsr;    /* copy unlink flag from caller */
+   ua->jcr->unlink_bsr = false;
 
    jcr->verify_job = verify_job;
    jcr->previous_job = previous_job;
    jcr->pool = pool;
    set_rwstorage(jcr, &store);
    jcr->client = client;
+   pm_strcpy(jcr->client_name, client->name());
    jcr->fileset = fileset;
    jcr->ExpectedFiles = files;
    if (catalog != NULL) {