pass context to seal/unseal_keys

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8551 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
2000-07-05 13:17:32 +00:00
parent 8e922c962d
commit bb90aecaee
12 changed files with 20 additions and 25 deletions

View File

@@ -111,7 +111,7 @@ _hdb_fetch(krb5_context context, HDB *db, unsigned flags, hdb_entry *entry)
return code;
hdb_value2entry(context, &value, entry);
if (db->master_key_set && (flags & HDB_F_DECRYPT))
hdb_unseal_keys (db, entry);
hdb_unseal_keys (context, db, entry);
krb5_data_free(&value);
return 0;
}
@@ -123,7 +123,7 @@ _hdb_store(krb5_context context, HDB *db, unsigned flags, hdb_entry *entry)
int code;
hdb_principal2key(context, entry->principal, &key);
hdb_seal_keys(db, entry);
hdb_seal_keys(context, db, entry);
hdb_entry2value(context, entry, &value);
code = db->_put(context, db, flags & HDB_F_REPLACE, key, value);
krb5_data_free(&value);

View File

@@ -103,7 +103,7 @@ DB_seq(krb5_context context, HDB *db,
if (hdb_value2entry(context, &data, entry))
return DB_seq(context, db, flags, entry, R_NEXT);
if (db->master_key_set && (flags & HDB_F_DECRYPT))
hdb_unseal_keys (db, entry);
hdb_unseal_keys (context, db, entry);
if (entry->principal == NULL) {
entry->principal = malloc(sizeof(*entry->principal));
hdb_key2principal(context, &key_data, entry->principal);

View File

@@ -108,7 +108,7 @@ DB_seq(krb5_context context, HDB *db,
if (hdb_value2entry(context, &data, entry))
return DB_seq(context, db, flags, entry, DB_NEXT);
if (db->master_key_set && (flags & HDB_F_DECRYPT))
hdb_unseal_keys (db, entry);
hdb_unseal_keys (context, db, entry);
if (entry->principal == NULL) {
entry->principal = malloc(sizeof(*entry->principal));
hdb_key2principal(context, &key_data, entry->principal);

View File

@@ -889,7 +889,7 @@ LDAP_seq(krb5_context context, HDB * db, unsigned flags, hdb_entry * entry)
if (ret == 0) {
if (db->master_key_set && (flags & HDB_F_DECRYPT))
hdb_unseal_keys(db, entry);
hdb_unseal_keys(context, db, entry);
}
return ret;
@@ -1106,7 +1106,7 @@ LDAP_fetch(krb5_context context, HDB * db, unsigned flags,
ret = LDAP_message2entry(context, db, e, entry);
if (ret == 0) {
if (db->master_key_set && (flags & HDB_F_DECRYPT))
hdb_unseal_keys(db, entry);
hdb_unseal_keys(context, db, entry);
}
out:
@@ -1134,7 +1134,7 @@ LDAP_store(krb5_context context, HDB * db, unsigned flags,
e = ldap_first_entry((LDAP *) db->db, msg);
}
hdb_seal_keys(db, entry);
hdb_seal_keys(context, db, entry);
/* turn new entry into LDAPMod array */
ret = LDAP_entry2mods(context, db, entry, e, &mods);

View File

@@ -94,7 +94,7 @@ NDBM_seq(krb5_context context, HDB *db,
if(hdb_value2entry(context, &data, entry))
return NDBM_seq(context, db, flags, entry, 0);
if (db->master_key_set && (flags & HDB_F_DECRYPT))
hdb_unseal_keys (db, entry);
hdb_unseal_keys (context, db, entry);
if (entry->principal == NULL) {
entry->principal = malloc (sizeof(*entry->principal));
hdb_key2principal (context, &key_data, entry->principal);

View File

@@ -62,7 +62,7 @@ kadm5_s_chpass_principal(void *server_handle,
if(ret)
goto out2;
hdb_seal_keys(context->db, &ent);
hdb_seal_keys(context->context, context->db, &ent);
kadm5_log_modify (context,
&ent,
@@ -105,7 +105,7 @@ kadm5_s_chpass_principal_with_key(void *server_handle,
if(ret)
goto out2;
hdb_seal_keys(context->db, &ent);
hdb_seal_keys(context->context, context->db, &ent);
kadm5_log_modify (context,
&ent,

View File

@@ -124,7 +124,7 @@ kadm5_s_create_principal_with_key(void *server_handle,
if(ret)
goto out;
hdb_seal_keys(context->db, &ent);
hdb_seal_keys(context->context, context->db, &ent);
kadm5_log_create (context, &ent);
@@ -176,7 +176,7 @@ kadm5_s_create_principal(void *server_handle,
ent.keys.val[3].key.keytype = ETYPE_DES3_CBC_SHA1;
ret = _kadm5_set_keys(context, &ent, password);
hdb_seal_keys(context->db, &ent);
hdb_seal_keys(context->context, context->db, &ent);
kadm5_log_create (context, &ent);

View File

@@ -57,7 +57,7 @@ kadm5_s_delete_principal(void *server_handle, krb5_principal princ)
goto out;
}
hdb_seal_keys(context->db, &ent);
hdb_seal_keys(context->context, context->db, &ent);
kadm5_log_delete (context, princ);

View File

@@ -63,7 +63,7 @@ modify_principal(void *server_handle,
if(ret)
goto out2;
hdb_seal_keys(context->db, &ent);
hdb_seal_keys(context->context, context->db, &ent);
kadm5_log_modify (context,
&ent,

View File

@@ -69,7 +69,7 @@ kadm5_s_randkey_principal(void *server_handle,
if(ret)
goto out3;
hdb_seal_keys(context->db, &ent);
hdb_seal_keys(context->context, context->db, &ent);
kadm5_log_modify (context,
&ent,

View File

@@ -82,7 +82,7 @@ kadm5_s_rename_principal(void *server_handle,
ent2.principal = ent.principal;
ent.principal = target;
hdb_seal_keys(context->db, &ent);
hdb_seal_keys(context->context, context->db, &ent);
kadm5_log_rename (context,
source,