Lines Matching defs:dbfile

1634 CA_DB *load_index(const char *dbfile, DB_ATTR *db_attr)
1646 in = BIO_new_file(dbfile, "r");
1654 "calling fstat(%s)", dbfile);
1663 BIO_snprintf(buf, sizeof(buf), "%s.attr", dbfile);
1665 BIO_snprintf(buf, sizeof(buf), "%s-attr", dbfile);
1685 retdb->dbfname = OPENSSL_strdup(dbfile);
1726 int save_index(const char *dbfile, const char *suffix, CA_DB *db)
1732 j = strlen(dbfile) + strlen(suffix);
1738 j = BIO_snprintf(buf[2], sizeof(buf[2]), "%s.attr", dbfile);
1739 j = BIO_snprintf(buf[1], sizeof(buf[1]), "%s.attr.%s", dbfile, suffix);
1740 j = BIO_snprintf(buf[0], sizeof(buf[0]), "%s.%s", dbfile, suffix);
1742 j = BIO_snprintf(buf[2], sizeof(buf[2]), "%s-attr", dbfile);
1743 j = BIO_snprintf(buf[1], sizeof(buf[1]), "%s-attr-%s", dbfile, suffix);
1744 j = BIO_snprintf(buf[0], sizeof(buf[0]), "%s-%s", dbfile, suffix);
1748 perror(dbfile);
1749 BIO_printf(bio_err, "Unable to open '%s'\n", dbfile);
1773 int rotate_index(const char *dbfile, const char *new_suffix,
1779 i = strlen(dbfile) + strlen(old_suffix);
1780 j = strlen(dbfile) + strlen(new_suffix);
1788 j = BIO_snprintf(buf[4], sizeof(buf[4]), "%s.attr", dbfile);
1789 j = BIO_snprintf(buf[3], sizeof(buf[3]), "%s.attr.%s", dbfile, old_suffix);
1790 j = BIO_snprintf(buf[2], sizeof(buf[2]), "%s.attr.%s", dbfile, new_suffix);
1791 j = BIO_snprintf(buf[1], sizeof(buf[1]), "%s.%s", dbfile, old_suffix);
1792 j = BIO_snprintf(buf[0], sizeof(buf[0]), "%s.%s", dbfile, new_suffix);
1794 j = BIO_snprintf(buf[4], sizeof(buf[4]), "%s-attr", dbfile);
1795 j = BIO_snprintf(buf[3], sizeof(buf[3]), "%s-attr-%s", dbfile, old_suffix);
1796 j = BIO_snprintf(buf[2], sizeof(buf[2]), "%s-attr-%s", dbfile, new_suffix);
1797 j = BIO_snprintf(buf[1], sizeof(buf[1]), "%s-%s", dbfile, old_suffix);
1798 j = BIO_snprintf(buf[0], sizeof(buf[0]), "%s-%s", dbfile, new_suffix);
1800 if (rename(dbfile, buf[1]) < 0 && errno != ENOENT
1805 BIO_printf(bio_err, "Unable to rename %s to %s\n", dbfile, buf[1]);
1809 if (rename(buf[0], dbfile) < 0) {
1810 BIO_printf(bio_err, "Unable to rename %s to %s\n", buf[0], dbfile);
1812 rename(buf[1], dbfile);
1822 rename(dbfile, buf[0]);
1823 rename(buf[1], dbfile);
1830 rename(dbfile, buf[0]);
1831 rename(buf[1], dbfile);