Lines Matching defs:dir
98 static int add2zonelist (const char *dir, const char *view, const char *zone, const char *file);
99 static int parsedir (const char *dir, zone_t **zp, const zconf_t *conf);
102 static int new_keysetfiles (const char *dir, time_t zone_signing_time);
106 static void copy_keyset (const char *dir, const char *domain, const zconf_t *conf);
255 fatal ("Couldn't open logfile %s in dir %s\n", logfile, config->zonedir);
292 char dir[255+1];
294 memset (dir, '\0', sizeof (dir));
296 strncpy (dir, config->zonedir, sizeof(dir));
297 if ( !parse_namedconf (namedconf, config->chroot_dir, dir, sizeof (dir), add2zonelist) )
304 char *dir = strdup (dirname);
306 p = dir + strlen (dir);
307 if ( p > dir )
312 if ( !parsedir (dir, &zonelist, config) )
313 fatal ("Can't read directory tree %s\n", dir);
315 fatal ("No signed zone found in directory tree %s\n", dir);
316 free (dir);
369 fprintf (stderr, "\t-L file|dir%s", loptstr (", --logfile=file|dir\n", ""));
373 fprintf (stderr, "\t-D dir%s", loptstr (", --directory=dir\n", ""));
399 static int add2zonelist (const char *dir, const char *view, const char *zone, const char *file)
406 if ( dir && *dir )
407 fprintf (stderr, "%s/", dir);
425 return zone_readdir (dir, zone, file, &zonelist, config, dynamic_zone);
428 static int parsedir (const char *dir, zone_t **zp, const zconf_t *conf)
434 dbg_val ("parsedir: (%s)\n", dir);
435 if ( !is_directory (dir) )
439 zone_readdir (dir, NULL, NULL, zp, conf, dynamic_zone);
441 dbg_val ("parsedir: opendir(%s)\n", dir);
442 if ( (dirp = opendir (dir)) == NULL )
450 pathname (path, sizeof (path), dir, dentp->d_name, NULL);
473 verbmesg (1, zp->conf, "parsing zone \"%s\" in dir \"%s\"\n", zp->zone, zp->dir);
475 pathname (path, sizeof (path), zp->dir, zp->sfile, NULL);
479 error ("Not a secure zone directory (%s)!\n", zp->dir);
480 lg_mesg (LG_ERROR, "\"%s\": not a secure zone directory (%s)!", zp->zone, zp->dir);
485 pathname (path, sizeof (path), zp->dir, zp->file, NULL);
501 lg_zone_start (zp->dir, zp->zone);
508 newkey = ksk5011status (&zp->keys, zp->dir, zp->zone, zp->conf);
521 newkey += zskstatus (&zp->keys, zp->dir, zp->zone, zp->conf);
524 pathname (path, sizeof (path), zp->dir, zp->conf->keyfile, NULL);
533 newkeysetfile = new_keysetfiles (zp->dir, zfilesig_time);
537 newkeysetfile = new_keysetfiles (zp->dir, zfilesig_time);
582 copy_keyset (zp->dir, zp->zone, zp->conf); /* copy the parent- file if it exist */
592 pathname (path, sizeof (path), zp->dir, zp->conf->keyfile, NULL);
609 pathname (path, sizeof (path), zp->dir, zp->file, NULL);
644 pathname (zfile, sizeof (zfile), zp->dir, zp->file, NULL);
645 pathname (path, sizeof (path), zp->dir, zp->sfile, NULL);
694 copy_keyset (zp->dir, zp->zone, zp->conf);
748 static int new_keysetfiles (const char *dir, time_t zone_signing_time)
755 if ( (dirp = opendir (dir)) == NULL )
759 dbg_val2 ("new_keysetfile (%s, %s)\n", dir, time2str (zone_signing_time, 's'));
765 pathname (path, sizeof (path), dir, dentp->d_name, NULL);
839 const char *dir;
845 dir = zp->dir;
933 if ( dir == NULL || *dir == '\0' )
934 dir = ".";
940 dir, SIGNCMD, param, nsec3param, dnskeyksk, gends, pseudo, rparam, keysetdir, domain, conf->sigvalidity, str, file, file);
944 dir, SIGNCMD, param, nsec3param, dnskeyksk, gends, pseudo, rparam, keysetdir, domain, conf->sigvalidity, str, file);
971 static void copy_keyset (const char *dir, const char *domain, const zconf_t *conf)
977 /* propagate "keyset"-file to parent dir */
981 snprintf (fromfile, sizeof (fromfile), "%s/parent-%s", dir, domain);
983 snprintf (fromfile, sizeof (fromfile), "%s/keyset-%s", dir, domain);
985 /* verbmesg (2, conf, "\t check \"%s\" against parent dir\n", fromfile); */
986 snprintf (tofile, sizeof (tofile), "%s/../keyset-%s", dir, domain);
989 verbmesg (2, conf, "\t copy \"%s\" to parent dir\n", fromfile);
992 error ("Couldn't copy \"%s\" to parent dir (%d:%s)\n",
994 lg_mesg (LG_ERROR, "\%s\": can't copy \"%s\" to parent dir (%d:%s)",