]> git.sur5r.net Git - openldap/commitdiff
ITS#5535 replace private _kadm5_*_key functions with public hdb funcs
authorHoward Chu <hyc@openldap.org>
Fri, 26 Jun 2009 04:08:47 +0000 (04:08 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 26 Jun 2009 04:08:47 +0000 (04:08 +0000)
contrib/slapd-modules/smbk5pwd/smbk5pwd.c

index 01e1b3b6ee19e8ce3d4cc0a65be692f2c949f41d..0909348137801905bbe24922e6076528cec8ad5a 100644 (file)
@@ -421,6 +421,7 @@ static int smbk5pwd_exop_passwd(
                krb5_error_code ret;
                hdb_entry ent;
                struct berval *keys;
+               size_t nkeys;
                int kvno, i;
                Attribute *a;
 
@@ -451,7 +452,9 @@ static int smbk5pwd_exop_passwd(
                                op->o_log_prefix, e->e_name.bv_val, 0 );
                }
 
-               ret = _kadm5_set_keys(kadm_context, &ent, qpw->rs_new.bv_val);
+               ret = hdb_generate_key_set_password(context, ent.principal,
+                       qpw->rs_new.bv_val, &ent.keys.val, &nkeys);
+               ent.keys.len = nkeys;
                hdb_seal_keys(context, db, &ent);
                krb5_free_principal( context, ent.principal );
 
@@ -470,7 +473,7 @@ static int smbk5pwd_exop_passwd(
                }
                BER_BVZERO( &keys[i] );
 
-               _kadm5_free_keys(kadm_context, ent.keys.len, ent.keys.val);
+               hdb_free_keys(context, ent.keys.len, ent.keys.val);
 
                if ( i != ent.keys.len ) {
                        ber_bvarray_free( keys );