Lines Matching refs:dbfile
1702 CA_DB *load_index(const char *dbfile, DB_ATTR *db_attr) in load_index() argument
1714 in = BIO_new_file(dbfile, "r"); in load_index()
1722 "calling fstat(%s)", dbfile); in load_index()
1731 BIO_snprintf(buf, sizeof(buf), "%s.attr", dbfile); in load_index()
1733 BIO_snprintf(buf, sizeof(buf), "%s-attr", dbfile); in load_index()
1752 retdb->dbfname = OPENSSL_strdup(dbfile); in load_index()
1793 int save_index(const char *dbfile, const char *suffix, CA_DB *db) in save_index() argument
1799 j = strlen(dbfile) + strlen(suffix); in save_index()
1805 BIO_snprintf(buf[2], sizeof(buf[2]), "%s.attr", dbfile); in save_index()
1806 BIO_snprintf(buf[1], sizeof(buf[1]), "%s.attr.%s", dbfile, suffix); in save_index()
1807 BIO_snprintf(buf[0], sizeof(buf[0]), "%s.%s", dbfile, suffix); in save_index()
1809 BIO_snprintf(buf[2], sizeof(buf[2]), "%s-attr", dbfile); in save_index()
1810 BIO_snprintf(buf[1], sizeof(buf[1]), "%s-attr-%s", dbfile, suffix); in save_index()
1811 BIO_snprintf(buf[0], sizeof(buf[0]), "%s-%s", dbfile, suffix); in save_index()
1815 perror(dbfile); in save_index()
1816 BIO_printf(bio_err, "Unable to open '%s'\n", dbfile); in save_index()
1840 int rotate_index(const char *dbfile, const char *new_suffix, in rotate_index() argument
1846 i = strlen(dbfile) + strlen(old_suffix); in rotate_index()
1847 j = strlen(dbfile) + strlen(new_suffix); in rotate_index()
1855 BIO_snprintf(buf[4], sizeof(buf[4]), "%s.attr", dbfile); in rotate_index()
1856 BIO_snprintf(buf[3], sizeof(buf[3]), "%s.attr.%s", dbfile, old_suffix); in rotate_index()
1857 BIO_snprintf(buf[2], sizeof(buf[2]), "%s.attr.%s", dbfile, new_suffix); in rotate_index()
1858 BIO_snprintf(buf[1], sizeof(buf[1]), "%s.%s", dbfile, old_suffix); in rotate_index()
1859 BIO_snprintf(buf[0], sizeof(buf[0]), "%s.%s", dbfile, new_suffix); in rotate_index()
1861 BIO_snprintf(buf[4], sizeof(buf[4]), "%s-attr", dbfile); in rotate_index()
1862 BIO_snprintf(buf[3], sizeof(buf[3]), "%s-attr-%s", dbfile, old_suffix); in rotate_index()
1863 BIO_snprintf(buf[2], sizeof(buf[2]), "%s-attr-%s", dbfile, new_suffix); in rotate_index()
1864 BIO_snprintf(buf[1], sizeof(buf[1]), "%s-%s", dbfile, old_suffix); in rotate_index()
1865 BIO_snprintf(buf[0], sizeof(buf[0]), "%s-%s", dbfile, new_suffix); in rotate_index()
1867 if (rename(dbfile, buf[1]) < 0 && errno != ENOENT in rotate_index()
1872 BIO_printf(bio_err, "Unable to rename %s to %s\n", dbfile, buf[1]); in rotate_index()
1876 if (rename(buf[0], dbfile) < 0) { in rotate_index()
1877 BIO_printf(bio_err, "Unable to rename %s to %s\n", buf[0], dbfile); in rotate_index()
1879 rename(buf[1], dbfile); in rotate_index()
1889 rename(dbfile, buf[0]); in rotate_index()
1890 rename(buf[1], dbfile); in rotate_index()
1897 rename(dbfile, buf[0]); in rotate_index()
1898 rename(buf[1], dbfile); in rotate_index()