Subject: | Starting named-checkzone via symbolic link can cause a crash |
From: | stephen@isc.org |
To: | bind9-public@isc.org |
Date: | Tue, 06 Feb 2018 15:09:34 +0000 |
If a symbolic link is created to named-checkzone and the program started via that link, it exits via an abort.
Mac:check(master):707% ./named-checkzone
usage: named-checkzone [-djqvD] [-c class] [-f inputformat] [-F outputformat] [-J filename] [-t directory] [-w directory] [-k (ignore|warn|fail)] [-n (ignore|warn|fail)] [-m (ignore|warn|fail)] [-r (ignore|warn|fail)] [-i (full|full-sibling|local|local-sibling|none)] [-M (ignore|warn|fail)] [-S (ignore|warn|fail)] [-W (ignore|warn)] [-o filename] zonename filename
Mac:check(master):708% ln -s ./named-checkzone check
Mac:check(master):709% ls -l check
lrwxr-xr-x 1 Stephen staff 17 6 Feb 14:59 check -> ./named-checkzone
Mac:check(master):710% ./check
./named-checkzone.c:145: INSIST(0) failed, back trace
#0 0x102feaae0 in ??
#1 0x102feaa6a in ??
#2 0x102e85f28 in ??
#3 0x7fff6f967115 in ??
Abort trap: 6
named-checkzone determines the command with which it was started (either named-checkzone or named-compilezone) and takes appropriate action based on this. In cases where the name is unknown (as in the case of the symbolic link example above), the program should print a suitable error and terminate, not exit via an INSIST.