Make hdb build on windows
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
This commit is contained in:

committed by
Love Hornquist Astrand

parent
7097787a21
commit
caf8f87598
@@ -389,6 +389,8 @@ hdb_sqlite_fetch(krb5_context context, HDB *db, krb5_const_principal principal,
|
||||
krb5_error_code ret;
|
||||
char *principal_string;
|
||||
hdb_sqlite_db *hsdb = (hdb_sqlite_db*)(db->hdb_db);
|
||||
sqlite3_stmt *fetch = hsdb->fetch;
|
||||
krb5_data value;
|
||||
|
||||
ret = krb5_unparse_name(context, principal, &principal_string);
|
||||
if (ret) {
|
||||
@@ -396,7 +398,6 @@ hdb_sqlite_fetch(krb5_context context, HDB *db, krb5_const_principal principal,
|
||||
return ret;
|
||||
}
|
||||
|
||||
sqlite3_stmt *fetch = hsdb->fetch;
|
||||
sqlite3_bind_text(fetch, 1, principal_string, -1, SQLITE_STATIC);
|
||||
|
||||
sqlite_error = hdb_sqlite_step(context, hsdb->db, fetch);
|
||||
@@ -421,7 +422,6 @@ hdb_sqlite_fetch(krb5_context context, HDB *db, krb5_const_principal principal,
|
||||
}
|
||||
}
|
||||
|
||||
krb5_data value;
|
||||
value.length = sqlite3_column_bytes(fetch, 0);
|
||||
value.data = (void *) sqlite3_column_blob(fetch, 0);
|
||||
|
||||
@@ -487,6 +487,8 @@ hdb_sqlite_store(krb5_context context, HDB *db, unsigned flags,
|
||||
const HDB_Ext_Aliases *aliases;
|
||||
|
||||
hdb_sqlite_db *hsdb = (hdb_sqlite_db *)(db->hdb_db);
|
||||
krb5_data value;
|
||||
sqlite3_stmt *get_ids = hsdb->get_ids;
|
||||
|
||||
ret = hdb_sqlite_exec_stmt(context, hsdb->db,
|
||||
"BEGIN IMMEDIATE TRANSACTION", EINVAL);
|
||||
@@ -507,14 +509,11 @@ hdb_sqlite_store(krb5_context context, HDB *db, unsigned flags,
|
||||
goto rollback;
|
||||
}
|
||||
|
||||
krb5_data value;
|
||||
ret = hdb_entry2value(context, &entry->entry, &value);
|
||||
if(ret) {
|
||||
goto rollback;
|
||||
}
|
||||
|
||||
sqlite3_stmt *get_ids = hsdb->get_ids;
|
||||
|
||||
sqlite3_bind_text(get_ids, 1, principal_string, -1, SQLITE_STATIC);
|
||||
ret = hdb_sqlite_step(context, hsdb->db, get_ids);
|
||||
|
||||
@@ -664,12 +663,13 @@ static krb5_error_code
|
||||
hdb_sqlite_destroy(krb5_context context, HDB *db)
|
||||
{
|
||||
int ret;
|
||||
hdb_sqlite_db *hsdb;
|
||||
|
||||
ret = hdb_clear_master_key(context, db);
|
||||
|
||||
hdb_sqlite_close_database(context, db);
|
||||
|
||||
hdb_sqlite_db *hsdb = (hdb_sqlite_db*)(db->hdb_db);
|
||||
hsdb = (hdb_sqlite_db*)(db->hdb_db);
|
||||
|
||||
free(hsdb->db_file);
|
||||
free(db->hdb_db);
|
||||
@@ -786,6 +786,7 @@ hdb_sqlite_remove(krb5_context context, HDB *db,
|
||||
krb5_error_code ret;
|
||||
char *principal_string;
|
||||
hdb_sqlite_db *hsdb = (hdb_sqlite_db*)(db->hdb_db);
|
||||
sqlite3_stmt *remove = hsdb->remove;
|
||||
|
||||
ret = krb5_unparse_name(context, principal, &principal_string);
|
||||
if (ret) {
|
||||
@@ -793,8 +794,6 @@ hdb_sqlite_remove(krb5_context context, HDB *db,
|
||||
return ret;
|
||||
}
|
||||
|
||||
sqlite3_stmt *remove = hsdb->remove;
|
||||
|
||||
sqlite3_bind_text(remove, 1, principal_string, -1, SQLITE_STATIC);
|
||||
|
||||
ret = hdb_sqlite_step(context, hsdb->db, remove);
|
||||
|
95
lib/hdb/libhdb-exports.def
Normal file
95
lib/hdb/libhdb-exports.def
Normal file
@@ -0,0 +1,95 @@
|
||||
EXPORTS
|
||||
encode_hdb_keyset
|
||||
hdb_add_master_key
|
||||
hdb_check_db_format
|
||||
hdb_clear_extension
|
||||
hdb_clear_master_key
|
||||
hdb_create
|
||||
hdb_db_dir
|
||||
hdb_dbinfo_get_acl_file
|
||||
hdb_dbinfo_get_binding
|
||||
hdb_dbinfo_get_dbname
|
||||
hdb_dbinfo_get_label
|
||||
hdb_dbinfo_get_log_file
|
||||
hdb_dbinfo_get_mkey_file
|
||||
hdb_dbinfo_get_next
|
||||
hdb_dbinfo_get_realm
|
||||
hdb_default_db
|
||||
hdb_enctype2key
|
||||
hdb_entry2string
|
||||
hdb_entry2value
|
||||
hdb_entry_alias2value
|
||||
hdb_entry_check_mandatory
|
||||
hdb_entry_clear_password
|
||||
hdb_entry_get_ConstrainedDelegACL
|
||||
hdb_entry_get_aliases
|
||||
hdb_entry_get_password
|
||||
hdb_entry_get_pkinit_acl
|
||||
hdb_entry_get_pkinit_cert
|
||||
hdb_entry_get_pkinit_hash
|
||||
hdb_entry_get_pw_change_time
|
||||
hdb_entry_set_password
|
||||
hdb_entry_set_pw_change_time
|
||||
hdb_find_extension
|
||||
hdb_foreach
|
||||
hdb_free_dbinfo
|
||||
hdb_free_entry
|
||||
hdb_free_key
|
||||
hdb_free_keys
|
||||
hdb_free_master_key
|
||||
hdb_generate_key_set
|
||||
hdb_generate_key_set_password
|
||||
hdb_get_dbinfo
|
||||
hdb_init_db
|
||||
hdb_key2principal
|
||||
hdb_list_builtin
|
||||
hdb_lock
|
||||
hdb_next_enctype2key
|
||||
hdb_principal2key
|
||||
hdb_print_entry
|
||||
hdb_process_master_key
|
||||
hdb_read_master_key
|
||||
hdb_replace_extension
|
||||
hdb_seal_key
|
||||
hdb_seal_key_mkey
|
||||
hdb_seal_keys
|
||||
hdb_seal_keys_mkey
|
||||
hdb_set_master_key
|
||||
hdb_set_master_keyfile
|
||||
hdb_unlock
|
||||
hdb_unseal_key
|
||||
hdb_unseal_key_mkey
|
||||
hdb_unseal_keys
|
||||
hdb_unseal_keys_mkey
|
||||
hdb_value2entry
|
||||
hdb_value2entry_alias
|
||||
hdb_write_master_key
|
||||
length_hdb_keyset
|
||||
|
||||
hdb_kt_ops
|
||||
|
||||
; some random bits needed for libkadm
|
||||
copy_Event
|
||||
copy_HDB_extensions
|
||||
copy_Key
|
||||
copy_Salt
|
||||
decode_HDB_extension
|
||||
encode_HDB_Ext_Aliases
|
||||
free_Event
|
||||
free_HDB_extension
|
||||
free_HDB_extensions
|
||||
free_Key
|
||||
free_hdb_entry
|
||||
asn1_HDBFlags_units
|
||||
HDBFlags2int
|
||||
int2HDBFlags
|
||||
length_HDB_Ext_Aliases
|
||||
decode_HDB_Ext_PKINIT_acl
|
||||
free_HDB_Ext_PKINIT_acl
|
||||
decode_HDB_Ext_Aliases
|
||||
free_HDB_Ext_Aliases
|
||||
length_HDB_extension
|
||||
encode_HDB_extension
|
||||
length_HDB_Ext_PKINIT_acl
|
||||
encode_HDB_Ext_PKINIT_acl
|
||||
|
Reference in New Issue
Block a user