X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fstored%2Fmatch_bsr.c;h=350de85a8415afca9d820e69b94fe8456173c2fc;hb=706490171cd2e5458defa3e4abfeca745d19d1f3;hp=ae54260f43b1b28ce192d7665da507104c50af02;hpb=095ae896b3fa96e6c8db2105519552b785e6b005;p=bacula%2Fbacula diff --git a/bacula/src/stored/match_bsr.c b/bacula/src/stored/match_bsr.c index ae54260f43..350de85a84 100644 --- a/bacula/src/stored/match_bsr.c +++ b/bacula/src/stored/match_bsr.c @@ -20,7 +20,7 @@ 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. @@ -193,7 +193,11 @@ BSR *find_next_bsr(BSR *root_bsr, DEVICE *dev) BSR *found_bsr = NULL; /* Do tape/disk seeking only if CAP_POSITIONBLOCKS is on */ - if (!root_bsr || !root_bsr->use_positioning || + if (!root_bsr) { + Dmsg0(dbglevel, "NULL root bsr pointer passed to find_next_bsr.\n"); + return NULL; + } + if (!root_bsr->use_positioning || !root_bsr->reposition || !dev->has_cap(CAP_POSITIONBLOCKS)) { Dmsg2(dbglevel, "No nxt_bsr use_pos=%d repos=%d\n", root_bsr->use_positioning, root_bsr->reposition); return NULL; @@ -433,7 +437,7 @@ static int match_client(BSR *bsr, BSR_CLIENT *client, SESSION_LABEL *sessrec, bo if (!client) { return 1; /* no specification matches all */ } - if (fnmatch(client->ClientName, sessrec->ClientName, 0) == 0) { + if (strcmp(client->ClientName, sessrec->ClientName) == 0) { return 1; } if (client->next) { @@ -447,7 +451,7 @@ static int match_job(BSR *bsr, BSR_JOB *job, SESSION_LABEL *sessrec, bool done) if (!job) { return 1; /* no specification matches all */ } - if (fnmatch(job->Job, sessrec->Job, 0) == 0) { + if (strcmp(job->Job, sessrec->Job) == 0) { return 1; } if (job->next) {