diff options
author | Jakob Schlyter <jakob@cvs.openbsd.org> | 2010-02-24 14:03:32 +0000 |
---|---|---|
committer | Jakob Schlyter <jakob@cvs.openbsd.org> | 2010-02-24 14:03:32 +0000 |
commit | 4c085753607bc76e09c0243e95d0020c78e41b76 (patch) | |
tree | f66f9e6be164e63263993579e2082995ea9b0606 /usr.sbin/nsd/nsd.c | |
parent | 28e72aed9394fa55d8d5356b929de6a649efb28b (diff) |
exit if paths are not relative to chroot
Diffstat (limited to 'usr.sbin/nsd/nsd.c')
-rw-r--r-- | usr.sbin/nsd/nsd.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/usr.sbin/nsd/nsd.c b/usr.sbin/nsd/nsd.c index d5afe8c11b0..8156cb78b6e 100644 --- a/usr.sbin/nsd/nsd.c +++ b/usr.sbin/nsd/nsd.c @@ -830,21 +830,17 @@ main(int argc, char *argv[]) } if (strncmp(nsd.chrootdir, nsd.pidfile, l) != 0) { - log_msg(LOG_ERR, "%s is not relative to %s: will not chroot", + error("%s is not relative to %s: chroot not possible", nsd.pidfile, nsd.chrootdir); - nsd.chrootdir = NULL; } else if (strncmp(nsd.chrootdir, nsd.dbfile, l) != 0) { - log_msg(LOG_ERR, "%s is not relative to %s: will not chroot", + error("%s is not relative to %s: chroot not possible", nsd.dbfile, nsd.chrootdir); - nsd.chrootdir = NULL; } else if (strncmp(nsd.chrootdir, nsd.options->xfrdfile, l) != 0) { - log_msg(LOG_ERR, "%s is not relative to %s: will not chroot", + error("%s is not relative to %s: chroot not possible", nsd.options->xfrdfile, nsd.chrootdir); - nsd.chrootdir = NULL; } else if (strncmp(nsd.chrootdir, nsd.options->difffile, l) != 0) { - log_msg(LOG_ERR, "%s is not relative to %s: will not chroot", + error("%s is not relative to %s: chroot not possible", nsd.options->difffile, nsd.chrootdir); - nsd.chrootdir = NULL; } } |