• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/Security-57031.1.35/Security/sec/securityd/

Lines Matching defs:version

115     /* Rename version 2 or version 3 tables and drop version table since
133 /* Move data from version 5 tables to new ones and drop old ones. */
155 /* On disk database format version upgrade scripts.
156 If pre is 0, version is unsupported and db is considered corrupt for having that version.
157 First entry creates the current db, each susequent entry upgrade to current from the version
164 { -1, 0, 1, false },/* 0->current: Create version 6*/
165 {}, /* 1->current: Upgrade to version 6 from version 1 -- Unsupported. */
166 {}, /* 2->current: Upgrade to version 6 from version 2 -- Unsupported */
167 {}, /* 3->current: Upgrade to version 6 from version 3 -- Unsupported */
168 {}, /* 4->current: Upgrade to version 6 from version 4 -- Unsupported */
169 { 3, 0, 7, true }, /* 5->current: Upgrade to version 6 from version 5 */
189 CFStringAppend(sql, CFSTR("CREATE TABLE tversion(version INTEGER);INSERT INTO tversion(version) VALUES(6);"));
202 /* Return the current database version in *version. Returns a
204 static bool s3dl_dbt_get_version(SecDbConnectionRef dbt, int *version, CFErrorRef *error)
206 CFStringRef sql = CFSTR("SELECT version FROM tversion LIMIT 1");
211 *version = sqlite3_column_int(stmt, 0);
217 /* We have a tversion table but we didn't find a single version
220 step_ok = SecDbError(SQLITE_CORRUPT, error, CFSTR("Failed to read version: database corrupt"));
221 secwarning("SELECT version step: %@", error ? *error : NULL);
228 static bool s3dl_dbt_upgrade_from_version(SecDbConnectionRef dbt, int version, CFErrorRef *error)
230 /* We need to go from db version to CURRENT_DB_VERSION, let's do so. */
233 if (version == CURRENT_DB_VERSION)
236 if (ok && version < 6) {
246 // Be conservative and get the version again once we start a transaction.
247 int cur_version = version;
250 /* If we are attempting to upgrade to a version greater than what we have
254 ok = SecDbError(SQLITE_CORRUPT, error, CFSTR("no upgrade script for version: %d"), cur_version);
255 secerror("no upgrade script for version %d", cur_version);
262 ok = SecDbError(SQLITE_CORRUPT, error, CFSTR("unsupported db version %d"), cur_version);
315 /* This function is called if the db doesn't have the proper version. We
316 start an exclusive transaction and recheck the version, and then perform
322 int version = 0; // Upgrade from version 0 == create new db
323 s3dl_dbt_get_version(dbt, &version, NULL);
324 return s3dl_dbt_upgrade_from_version(dbt, version, error);
1062 /* Specialized version of SecItemAdd for shared web credentials */
1280 /* Specialized version of SecItemCopyMatching for shared web credentials */