72dbcd0 SYSDB: Refactor database connection

Authored and Committed by jhrozek 4 years ago
    SYSDB: Refactor database connection
    
    Changes the functions in sysdb_init.c so that the functions are usable
    to initialize a second cache to store timestamps. In particular,
    functions that operated on sysdb->ldb now operate on a generic ldb
    context so that a new ldb_ts context can be used later. Existing
    functions that initialize the sysdb cache call the generic functions
    with sysdb->ldb as a parameter.
    
    Splits out a function to initialize an empty ldb database with a generic
    LDIF.
    
    Splits out the sysdb upgrade function because the upgrade will only be
    used by the sysdb cache, the timestamp cache will start with a different
    version and might receive separate upgrade functions in the future.
    
    The ldb connection function accepts ldb flags parameter, currently
    unused.
    
    Reviewed-by: Sumit Bose <sbose@redhat.com>
    
        
file modified
+337 -180
file modified
+3 -1
file modified
+2 -2