Make krb5_db_free_principal and krb5_db_free_mkey_list return void.
authorGreg Hudson <ghudson@mit.edu>
Fri, 2 Jul 2010 19:18:12 +0000 (19:18 +0000)
committerGreg Hudson <ghudson@mit.edu>
Fri, 2 Jul 2010 19:18:12 +0000 (19:18 +0000)
Remove the stale prototype for krb5_db_free_master_key.

ticket: 6749
status: open

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24167 dc483132-0cff-0310-8789-dd5450dbe970

src/include/kdb.h
src/lib/kdb/kdb5.c
src/plugins/kdb/db2/db2_exp.c
src/plugins/kdb/db2/kdb_db2.c
src/plugins/kdb/db2/kdb_db2.h
src/plugins/kdb/ldap/libkdb_ldap/ldap_principal.c
src/plugins/kdb/ldap/libkdb_ldap/ldap_principal.h

index 856cf0bdf64ed529a729cb05bb4eedcde22f3e75..b959b15728c732b7a99eaaffe6aae232c3269a9b 100644 (file)
@@ -434,9 +434,8 @@ krb5_error_code krb5_db_get_principal_ext ( krb5_context kcontext,
                                             krb5_db_entry *entries,
                                             int *nentries,
                                             krb5_boolean *more );
-krb5_error_code krb5_db_free_principal ( krb5_context kcontext,
-                                         krb5_db_entry *entry,
-                                         int count );
+void krb5_db_free_principal ( krb5_context kcontext, krb5_db_entry *entry,
+                              int count );
 krb5_error_code krb5_db_put_principal ( krb5_context kcontext,
                                         krb5_db_entry *entries,
                                         int *nentries);
@@ -454,8 +453,6 @@ krb5_error_code krb5_db_set_mkey_list( krb5_context context,
 krb5_error_code krb5_db_get_mkey_list( krb5_context kcontext,
                                        krb5_keylist_node ** keylist);
 
-krb5_error_code krb5_db_free_master_key ( krb5_context kcontext,
-                                          krb5_keyblock *key );
 krb5_error_code krb5_db_store_master_key  ( krb5_context kcontext,
                                             char *keyfile,
                                             krb5_principal mname,
@@ -483,7 +480,7 @@ krb5_db_fetch_mkey_list( krb5_context    context,
                          krb5_kvno             mkvno,
                          krb5_keylist_node  **mkeys_list );
 
-krb5_error_code
+void
 krb5_db_free_mkey_list( krb5_context         context,
                         krb5_keylist_node  *mkey_list );
 
@@ -1011,8 +1008,8 @@ typedef struct _kdb_vftabl {
      * allocate associated memory); thus, a plugin must allocate each field
      * of a principal entry separately.
      */
-    krb5_error_code (*free_principal)(krb5_context kcontext,
-                                      krb5_db_entry *entry, int count);
+    void (*free_principal)(krb5_context kcontext, krb5_db_entry *entry,
+                           int count);
 
     /*
      * Optional: Create or modify one or more principal entries.  All callers
index 8a199845776c362938460d13739c822810d0fdbe..b06cf76c5b0a4a7cc49b608469baf9f06b26871c 100644 (file)
@@ -776,7 +776,7 @@ krb5_db_get_principal_ext(krb5_context kcontext,
                             more);
 }
 
-krb5_error_code
+void
 krb5_db_free_principal(krb5_context kcontext, krb5_db_entry * entry, int count)
 {
     krb5_error_code status = 0;
@@ -784,10 +784,8 @@ krb5_db_free_principal(krb5_context kcontext, krb5_db_entry * entry, int count)
 
     status = get_vftabl(kcontext, &v);
     if (status)
-        return status;
-    if (v->free_principal == NULL)
-        return KRB5_KDB_DBTYPE_NOSUP;
-    return v->free_principal(kcontext, entry, count);
+        return;
+    v->free_principal(kcontext, entry, count);
 }
 
 static void
@@ -1113,7 +1111,7 @@ krb5_db_fetch_mkey_list(krb5_context     context,
     return v->fetch_master_key_list(context, mname, mkey, mkvno, mkey_list);
 }
 
-krb5_error_code
+void
 krb5_db_free_mkey_list(krb5_context    context,
                        krb5_keylist_node  *mkey_list)
 {
@@ -1125,8 +1123,6 @@ krb5_db_free_mkey_list(krb5_context    context,
         krb5_free_keyblock_contents(context, &prev->keyblock);
         krb5_xfree(prev);
     }
-
-    return 0;
 }
 
 krb5_error_code
index aabeb9d03b877c22a15d851801ea6bea39688ad1..f6132e98d02f89c6a2307712b4a1b42273c97fc3 100644 (file)
@@ -125,11 +125,11 @@ WRAP_K (krb5_db2_get_principal,
          int * i,
          krb5_boolean *b),
         (ctx, p, d, i, b));
-WRAP_K (krb5_db2_free_principal,
-        (krb5_context ctx,
-         krb5_db_entry *d,
-         int i),
-        (ctx, d, i));
+WRAP_VOID (krb5_db2_free_principal,
+           (krb5_context ctx,
+            krb5_db_entry *d,
+            int i),
+           (ctx, d, i));
 WRAP_K (krb5_db2_put_principal,
         (krb5_context ctx,
          krb5_db_entry *d,
index 3e32a943752baecfc9a3d3c8442e3c6c3027ee37..22a9133527e1f3b4e9d73bc40c79253c9a95df2f 100644 (file)
@@ -925,7 +925,7 @@ cleanup:
 /*
   Free stuff returned by krb5_db2_get_principal.
 */
-krb5_error_code
+void
 krb5_db2_free_principal(krb5_context context, krb5_db_entry *entries,
                         int nentries)
 {
index f31017d10e5d5f3bbcf9b943688d9743f010a149..d7ac7a4cb2e4e9db5f6483d36e0c1dedb038e9f6 100644 (file)
@@ -61,7 +61,7 @@ krb5_error_code krb5_db2_get_age(krb5_context, char *, time_t *);
 krb5_error_code krb5_db2_rename(krb5_context, char *, char *, int );
 krb5_error_code krb5_db2_get_principal(krb5_context, krb5_const_principal,
                                        krb5_db_entry *, int *, krb5_boolean *);
-krb5_error_code krb5_db2_free_principal(krb5_context, krb5_db_entry *, int);
+void krb5_db2_free_principal(krb5_context, krb5_db_entry *, int);
 krb5_error_code krb5_db2_put_principal(krb5_context, krb5_db_entry *, int *,
                                        char **db_args);
 krb5_error_code krb5_db2_iterate_ext(krb5_context,
index 5fcc92b68df51710ab41ae464bb935bd06ebfe60..9128fd5d7ea3f67d22c38d8fd916ce5ae4ad410b 100644 (file)
@@ -122,7 +122,7 @@ krb5_dbe_free_contents(krb5_context context, krb5_db_entry *entry)
 }
 
 
-krb5_error_code
+void
 krb5_ldap_free_principal(krb5_context kcontext, krb5_db_entry *entries,
                          int nentries)
 {
index 9969d532ad8aa803d56d7cd40b7b12e75c38ea92..805462d36edb6062e0e331740204d88fcf18e289 100644 (file)
@@ -104,7 +104,7 @@ krb5_ldap_get_principal(krb5_context , krb5_const_principal ,
 krb5_error_code
 krb5_ldap_delete_principal(krb5_context, krb5_const_principal, int *);
 
-krb5_error_code
+void
 krb5_ldap_free_principal(krb5_context, krb5_db_entry *, int );
 
 krb5_error_code