From 2ec9316ee4ce3a2ee171d15ed341f87e48e340b4 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Wed, 16 Feb 2005 12:48:46 +0000 Subject: [PATCH] Make another attempt at fixing the ClientRunXXX return code 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 | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/bacula/src/dird/ua_status.c b/bacula/src/dird/ua_status.c index 4040e9af6e..0b204a064e 100644 --- a/bacula/src/dird/ua_status.c +++ b/bacula/src/dird/ua_status.c @@ -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, -- 2.39.5