svn rev #24167: trunk/src/ include/ lib/kdb/ plugins/kdb/db2/ plugins/kdb/ldap/libkdb_ldap/

ghudson@MIT.EDU ghudson at MIT.EDU
Fri Jul 2 15:18:12 EDT 2010


http://src.mit.edu/fisheye/changelog/krb5/?cs=24167
Commit By: ghudson
Log Message:
ticket: 6749
status: open

Make krb5_db_free_principal and krb5_db_free_mkey_list return void.
Remove the stale prototype for krb5_db_free_master_key.



Changed Files:
U   trunk/src/include/kdb.h
U   trunk/src/lib/kdb/kdb5.c
U   trunk/src/plugins/kdb/db2/db2_exp.c
U   trunk/src/plugins/kdb/db2/kdb_db2.c
U   trunk/src/plugins/kdb/db2/kdb_db2.h
U   trunk/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal.c
U   trunk/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal.h
Modified: trunk/src/include/kdb.h
===================================================================
--- trunk/src/include/kdb.h	2010-07-02 19:09:20 UTC (rev 24166)
+++ trunk/src/include/kdb.h	2010-07-02 19:18:12 UTC (rev 24167)
@@ -434,9 +434,8 @@
                                             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_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_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 @@
      * 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

Modified: trunk/src/lib/kdb/kdb5.c
===================================================================
--- trunk/src/lib/kdb/kdb5.c	2010-07-02 19:09:20 UTC (rev 24166)
+++ trunk/src/lib/kdb/kdb5.c	2010-07-02 19:18:12 UTC (rev 24167)
@@ -776,7 +776,7 @@
                             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 @@
 
     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 @@
     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_free_keyblock_contents(context, &prev->keyblock);
         krb5_xfree(prev);
     }
-
-    return 0;
 }
 
 krb5_error_code

Modified: trunk/src/plugins/kdb/db2/db2_exp.c
===================================================================
--- trunk/src/plugins/kdb/db2/db2_exp.c	2010-07-02 19:09:20 UTC (rev 24166)
+++ trunk/src/plugins/kdb/db2/db2_exp.c	2010-07-02 19:18:12 UTC (rev 24167)
@@ -125,11 +125,11 @@
          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,

Modified: trunk/src/plugins/kdb/db2/kdb_db2.c
===================================================================
--- trunk/src/plugins/kdb/db2/kdb_db2.c	2010-07-02 19:09:20 UTC (rev 24166)
+++ trunk/src/plugins/kdb/db2/kdb_db2.c	2010-07-02 19:18:12 UTC (rev 24167)
@@ -925,7 +925,7 @@
 /*
   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)
 {

Modified: trunk/src/plugins/kdb/db2/kdb_db2.h
===================================================================
--- trunk/src/plugins/kdb/db2/kdb_db2.h	2010-07-02 19:09:20 UTC (rev 24166)
+++ trunk/src/plugins/kdb/db2/kdb_db2.h	2010-07-02 19:18:12 UTC (rev 24167)
@@ -61,7 +61,7 @@
 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,

Modified: trunk/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal.c
===================================================================
--- trunk/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal.c	2010-07-02 19:09:20 UTC (rev 24166)
+++ trunk/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal.c	2010-07-02 19:18:12 UTC (rev 24167)
@@ -122,7 +122,7 @@
 }
 
 
-krb5_error_code
+void
 krb5_ldap_free_principal(krb5_context kcontext, krb5_db_entry *entries,
                          int nentries)
 {

Modified: trunk/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal.h
===================================================================
--- trunk/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal.h	2010-07-02 19:09:20 UTC (rev 24166)
+++ trunk/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal.h	2010-07-02 19:18:12 UTC (rev 24167)
@@ -104,7 +104,7 @@
 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




More information about the cvs-krb5 mailing list