]> 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 96944d393cd9e669fb377d16c8e0724f998acc2b..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));
 
@@ -463,6 +467,7 @@ int run_cmd(UAContext *ua, const char *cmd)
    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) {