diff -u -r --show-c-function --exclude-from=amanda.diff amanda-2.4.5b1.orig/server-src/amcheck.c amanda-2.4.5b1.new/server-src/amcheck.c --- amanda-2.4.5b1.orig/server-src/amcheck.c 2003-11-25 07:21:07.000000000 -0500 +++ amanda-2.4.5b1.new/server-src/amcheck.c 2004-02-05 11:42:09.000000000 -0500 @@ -959,7 +959,11 @@ int start_server_check(fd, do_localchk, tapebad = 1; } else if(strcmp(label, FAKE_LABEL) != 0) { tp = lookup_tapelabel(label); - if(tp != NULL && !reusable_tape(tp)) { + if(tp == NULL) { + fprintf(outf, "ERROR: label %s match labelstr but it not listed in the tapelist file.\n", label); + tapebad = 1; + } + else if(tp != NULL && !reusable_tape(tp)) { fprintf(outf, "ERROR: cannot overwrite active tape %s\n", label); tapebad = 1; } diff -u -r --show-c-function --exclude-from=amanda.diff amanda-2.4.5b1.orig/server-src/taper.c amanda-2.4.5b1.new/server-src/taper.c --- amanda-2.4.5b1.orig/server-src/taper.c 2003-11-25 07:21:08.000000000 -0500 +++ amanda-2.4.5b1.new/server-src/taper.c 2004-02-05 11:42:21.000000000 -0500 @@ -1791,7 +1791,14 @@ int label_tape() /* check against tape list */ if (strcmp(label, FAKE_LABEL) != 0) { tp = lookup_tapelabel(label); - if(tp != NULL && !reusable_tape(tp)) { + if(tp == NULL) { + errstr = newvstralloc(errstr, + "label ", label, + " match labelstr but it not listed in the tapelist file", + NULL); + return 0; + } + else if(tp != NULL && !reusable_tape(tp)) { errstr = newvstralloc(errstr, "cannot overwrite active tape ", label, NULL);