Lines Matching refs:chrootdir
553 log_init(cfg->logfile, cfg->use_syslog, cfg->chrootdir);
562 /* true if pidfile is inside chrootdir, or nochroot */
563 pidinchroot = need_pidfile && (!(cfg->chrootdir && cfg->chrootdir[0]) ||
564 (cfg->chrootdir && cfg->chrootdir[0] &&
565 strncmp(cfg->pidfile, cfg->chrootdir,
566 strlen(cfg->chrootdir))==0));
623 if(cfg->chrootdir && cfg->chrootdir[0]) {
624 if(chdir(cfg->chrootdir)) {
626 cfg->chrootdir, strerror(errno));
628 verbose(VERB_QUERY, "chdir to %s", cfg->chrootdir);
629 if(chroot(cfg->chrootdir))
631 cfg->chrootdir, strerror(errno));
634 cfg->chrootdir, strerror(errno));
635 verbose(VERB_QUERY, "chroot to %s", cfg->chrootdir);
636 if(strncmp(*cfgfile, cfg->chrootdir,
637 strlen(cfg->chrootdir)) == 0)
638 (*cfgfile) += strlen(cfg->chrootdir);
642 strncmp(daemon->pidfile, cfg->chrootdir,
643 strlen(cfg->chrootdir))==0) {
645 daemon->pidfile = strdup(old+strlen(cfg->chrootdir));
650 daemon->chroot = strdup(cfg->chrootdir);
660 if(cfg->chrootdir && cfg->chrootdir[0] &&
661 strncmp(dir, cfg->chrootdir,
662 strlen(cfg->chrootdir)) == 0)
663 dir += strlen(cfg->chrootdir);
710 log_init(cfg->logfile, cfg->use_syslog, cfg->chrootdir);
763 log_init(cfg->logfile, 0, cfg->chrootdir);