Lines Matching refs:chrootdir
555 log_init(cfg->logfile, cfg->use_syslog, cfg->chrootdir);
564 /* true if pidfile is inside chrootdir, or nochroot */
565 pidinchroot = need_pidfile && (!(cfg->chrootdir && cfg->chrootdir[0]) ||
566 (cfg->chrootdir && cfg->chrootdir[0] &&
567 strncmp(cfg->pidfile, cfg->chrootdir,
568 strlen(cfg->chrootdir))==0));
625 if(cfg->chrootdir && cfg->chrootdir[0]) {
626 if(chdir(cfg->chrootdir)) {
628 cfg->chrootdir, strerror(errno));
630 verbose(VERB_QUERY, "chdir to %s", cfg->chrootdir);
631 if(chroot(cfg->chrootdir))
633 cfg->chrootdir, strerror(errno));
636 cfg->chrootdir, strerror(errno));
637 verbose(VERB_QUERY, "chroot to %s", cfg->chrootdir);
638 if(strncmp(*cfgfile, cfg->chrootdir,
639 strlen(cfg->chrootdir)) == 0)
640 (*cfgfile) += strlen(cfg->chrootdir);
644 strncmp(daemon->pidfile, cfg->chrootdir,
645 strlen(cfg->chrootdir))==0) {
647 daemon->pidfile = strdup(old+strlen(cfg->chrootdir));
652 daemon->chroot = strdup(cfg->chrootdir);
662 if(cfg->chrootdir && cfg->chrootdir[0] &&
663 strncmp(dir, cfg->chrootdir,
664 strlen(cfg->chrootdir)) == 0)
665 dir += strlen(cfg->chrootdir);
712 log_init(cfg->logfile, cfg->use_syslog, cfg->chrootdir);
764 log_init(cfg->logfile, 0, cfg->chrootdir);