]> git.sur5r.net Git - bacula/bacula/commitdiff
Make another attempt at fixing the ClientRunXXX return code
authorKern Sibbald <kern@sibbald.com>
Wed, 16 Feb 2005 12:48:46 +0000 (12:48 +0000)
committerKern Sibbald <kern@sibbald.com>
Wed, 16 Feb 2005 12:48:46 +0000 (12:48 +0000)
  bug on Win32 machines.

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1831 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/dird/ua_status.c

index 4040e9af6e3f7a6e439a60a9116f76978f95a67d..0b204a064e312aca61cf9e570679442d53f35f46 100644 (file)
@@ -665,6 +665,19 @@ static void list_terminated_jobs(UAContext *ua)
       char JobName[MAX_NAME_LENGTH];
       const char *termstat;
 
+      bstrncpy(JobName, je->Job, sizeof(JobName));
+      /* There are three periods after the Job name */
+      char *p;
+      for (int i=0; i<3; i++) {
+        if ((p=strrchr(JobName, '.')) != NULL) {
+           *p = 0;
+        }
+      }
+
+      if (!acl_access_ok(ua, Job_ACL, JobName)) {
+        continue;
+      }
+
       bstrftime_nc(dt, sizeof(dt), je->end_time);
       switch (je->JobType) {
       case JT_ADMIN:
@@ -697,14 +710,6 @@ static void list_terminated_jobs(UAContext *ua)
         termstat = "Other";
         break;
       }
-      bstrncpy(JobName, je->Job, sizeof(JobName));
-      /* There are three periods after the Job name */
-      char *p;
-      for (int i=0; i<3; i++) {
-        if ((p=strrchr(JobName, '.')) != NULL) {
-           *p = 0;
-        }
-      }
       bsendmsg(ua, _("%6d  %-6s %8s %14s %-7s  %-8s %s\n"),
         je->JobId,
         level,