439
edits
| Line 88: | Line 88: | ||
This design assumes that new NSS init functions will be defined for applications wanting to do 'standard user initialization', rather than building special knowledge into softoken or the database model. Note: This is different from the 2001 design, or and earlier prototype shared database, where the database code knew the location of the shared database. | This design assumes that new NSS init functions will be defined for applications wanting to do 'standard user initialization', rather than building special knowledge into softoken or the database model. Note: This is different from the 2001 design, or and earlier prototype shared database, where the database code knew the location of the shared database. | ||
==== | ==== Database Upgrade ==== | ||
NSS will automatically upgrade from old databases to new databases if the following conditions are met: | |||
# The application (either explicitly or implicitly) opens an sql style database read write. | |||
# The sql database does not exist. | |||
# A legacy dbm database exists in the same directory of the sql database. | |||
# The application logs into the softoken (supplies the database password for the existing legacy database). If there is no password this condition is met automatically. | |||
This upgrade handles the initial case where applications want to get the new features of the new database, but not necessarily want to participate in any sharing scheme. | |||
A more natural tact an application may take is move from it's own database instance to a common database instance, shared among several applications. In this case, the application will need to participate in the database upgrade, as it may be necessary to actually merge entries from several databases. In this case NSS will provide services for the application to determine if the shared database it opened had already been updated by the application itself. If not, NSS will provide the application with a function (to be defined), which will read records from the old database and merge them into the new database. NOTE: we may need a couple of functions here to allow recoding such things as passwords encoded with sdr keys which the application may have. | |||
==== Layering ==== | ==== Layering ==== | ||
edits