svn rev #23965: trunk/src/ include/ lib/kdb/ plugins/kdb/db2/ plugins/kdb/hdb/ ...

ghudson@MIT.EDU ghudson at MIT.EDU
Tue May 4 00:12:25 EDT 2010


http://src.mit.edu/fisheye/changelog/krb5/?cs=23965
Commit By: ghudson
Log Message:
Remove krb5_db_set_option and the associated DAL entry.  It was not
used.



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/hdb/kdb_hdb.c
U   trunk/src/plugins/kdb/ldap/ldap_exp.c
U   trunk/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.h
U   trunk/src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.c
Modified: trunk/src/include/kdb.h
===================================================================
--- trunk/src/include/kdb.h	2010-05-03 23:44:30 UTC (rev 23964)
+++ trunk/src/include/kdb.h	2010-05-04 04:12:24 UTC (rev 23965)
@@ -417,7 +417,6 @@
 krb5_error_code krb5_db_destroy ( krb5_context kcontext, char **db_args );
 krb5_error_code krb5_db_promote ( krb5_context kcontext, char **db_args );
 krb5_error_code krb5_db_get_age ( krb5_context kcontext, char *db_name, time_t *t );
-krb5_error_code krb5_db_set_option ( krb5_context kcontext, int option, void *value );
 krb5_error_code krb5_db_lock ( krb5_context kcontext, int lock_mode );
 krb5_error_code krb5_db_unlock ( krb5_context kcontext );
 krb5_error_code krb5_db_get_principal ( krb5_context kcontext,
@@ -950,22 +949,6 @@
                                   time_t *age);
 
     /*
-     * Optional: Set a database option.  This function is not currently used by
-     * any callers.  Behavior depends on the value of option:
-     *
-     * KRB5_KDB_OPT_SET_DB_NAME: Interpret value as a C string.  Set the
-     * database name (e.g. a filename for an embedded database).
-     *
-     * KRB5_KDB_OPT_SET_LOCK_MODE: Interpret value as a pointer to
-     * krb5_boolean.  If *value points to TRUE, set the database to
-     * non-blocking lock mode, causing operations to return OSA_ADB_CANTLOCK_DB
-     * when it would otherwise wait to obtain a lock.  Set *value to the old
-     * value of the non-blocking flag.
-     */
-    krb5_error_code (*db_set_option)(krb5_context kcontext, int option,
-                                     void *value);
-
-    /*
      * Optional: Lock the database, with semantics depending on the mode
      * argument:
      *

Modified: trunk/src/lib/kdb/kdb5.c
===================================================================
--- trunk/src/lib/kdb/kdb5.c	2010-05-03 23:44:30 UTC (rev 23964)
+++ trunk/src/lib/kdb/kdb5.c	2010-05-04 04:12:24 UTC (rev 23965)
@@ -744,22 +744,6 @@
 }
 
 krb5_error_code
-krb5_db_set_option(krb5_context kcontext, int option, void *value)
-{
-    krb5_error_code status = 0;
-    kdb_vftabl *v;
-
-    status = get_vftabl(kcontext, &v);
-    if (status)
-        return status;
-    if (v->db_set_option == NULL)
-        return KRB5_KDB_DBTYPE_NOSUP;
-    status = v->db_set_option(kcontext, option, value);
-    get_errmsg(kcontext, status);
-    return status;
-}
-
-krb5_error_code
 krb5_db_lock(krb5_context kcontext, int lock_mode)
 {
     krb5_error_code status = 0;

Modified: trunk/src/plugins/kdb/db2/db2_exp.c
===================================================================
--- trunk/src/plugins/kdb/db2/db2_exp.c	2010-05-03 23:44:30 UTC (rev 23964)
+++ trunk/src/plugins/kdb/db2/db2_exp.c	2010-05-04 04:12:24 UTC (rev 23965)
@@ -110,11 +110,6 @@
          char *s,
          time_t *t),
         (ctx, s, t));
-WRAP_K (krb5_db2_db_set_option,
-        ( krb5_context kcontext,
-          int option,
-          void *value ),
-        (kcontext, option, value));
 
 WRAP_K (krb5_db2_db_lock,
         ( krb5_context    context,
@@ -238,7 +233,6 @@
     /* db_create */                              wrap_krb5_db2_create,
     /* db_destroy */                             wrap_krb5_db2_destroy,
     /* db_get_age */                             wrap_krb5_db2_db_get_age,
-    /* db_set_option */                          wrap_krb5_db2_db_set_option,
     /* db_lock */                                wrap_krb5_db2_db_lock,
     /* db_unlock */                              wrap_krb5_db2_db_unlock,
     /* db_get_principal */                       wrap_krb5_db2_db_get_principal,

Modified: trunk/src/plugins/kdb/db2/kdb_db2.c
===================================================================
--- trunk/src/plugins/kdb/db2/kdb_db2.c	2010-05-03 23:44:30 UTC (rev 23964)
+++ trunk/src/plugins/kdb/db2/kdb_db2.c	2010-05-04 04:12:24 UTC (rev 23965)
@@ -1557,39 +1557,6 @@
     return krb5_db2_db_set_mkey(kcontext, key);
 }
 
-krb5_error_code
-krb5_db2_db_set_option(krb5_context kcontext, int option, void *value)
-{
-    krb5_error_code status = 0;
-    krb5_boolean oldval;
-    krb5_db2_context *db_ctx;
-    kdb5_dal_handle *dal_handle;
-
-    if (!k5db2_inited(kcontext))
-        return KRB5_KDB_DBNOTINITED;
-
-    dal_handle = kcontext->dal_handle;
-    db_ctx = (krb5_db2_context *) dal_handle->db_context;
-
-
-    switch (option) {
-    case KRB5_KDB_OPT_SET_DB_NAME:
-        status = krb5_db2_db_set_name(kcontext, (char *) value, db_ctx->tempdb);
-        break;
-
-    case KRB5_KDB_OPT_SET_LOCK_MODE:
-        oldval = krb5_db2_db_set_lockmode(kcontext, *((krb5_boolean *) value));
-        *((krb5_boolean *) value) = oldval;
-        break;
-
-    default:
-        status = -1;            /* TBD */
-        break;
-    }
-
-    return status;
-}
-
 void   *
 krb5_db2_alloc(krb5_context kcontext, void *ptr, size_t size)
 {

Modified: trunk/src/plugins/kdb/hdb/kdb_hdb.c
===================================================================
--- trunk/src/plugins/kdb/hdb/kdb_hdb.c	2010-05-03 23:44:30 UTC (rev 23964)
+++ trunk/src/plugins/kdb/hdb/kdb_hdb.c	2010-05-04 04:12:24 UTC (rev 23965)
@@ -567,14 +567,6 @@
 }
 
 static krb5_error_code
-kh_db_set_option(krb5_context context,
-                 int option,
-                 void *value)
-{
-    return KRB5_KDB_DBTYPE_NOSUP;
-}
-
-static krb5_error_code
 kh_db_lock(krb5_context context, int kmode)
 {
     kh_db_context *kh = KH_DB_CONTEXT(context);
@@ -1386,7 +1378,6 @@
     kh_db_create,
     kh_db_destroy,
     kh_db_get_age,
-    kh_db_set_option,
     kh_db_lock,
     kh_db_unlock,
     kh_db_get_principal,

Modified: trunk/src/plugins/kdb/ldap/ldap_exp.c
===================================================================
--- trunk/src/plugins/kdb/ldap/ldap_exp.c	2010-05-03 23:44:30 UTC (rev 23964)
+++ trunk/src/plugins/kdb/ldap/ldap_exp.c	2010-05-04 04:12:24 UTC (rev 23965)
@@ -56,7 +56,6 @@
     /* db_create */                         krb5_ldap_create,
     /* db_destroy */                        krb5_ldap_delete_realm_1,
     /* db_get_age */                        krb5_ldap_db_get_age,
-    /* db_set_option */                     krb5_ldap_set_option,
     /* db_lock */                           krb5_ldap_lock,
     /* db_unlock */                         krb5_ldap_unlock,
     /* db_get_principal */                  krb5_ldap_get_principal,

Modified: trunk/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.h
===================================================================
--- trunk/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.h	2010-05-03 23:44:30 UTC (rev 23964)
+++ trunk/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.h	2010-05-04 04:12:24 UTC (rev 23965)
@@ -304,9 +304,6 @@
 
 
 krb5_error_code
-krb5_ldap_set_option( krb5_context, int, void * );
-
-krb5_error_code
 krb5_ldap_lock( krb5_context, int );
 
 krb5_error_code

Modified: trunk/src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.c
===================================================================
--- trunk/src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.c	2010-05-03 23:44:30 UTC (rev 23964)
+++ trunk/src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.c	2010-05-04 04:12:24 UTC (rev 23965)
@@ -1474,14 +1474,6 @@
 }
 
 krb5_error_code
-krb5_ldap_set_option(krb5_context kcontext, int option, void *value)
-{
-    krb5_error_code status = KRB5_PLUGIN_OP_NOTSUPP;
-    krb5_set_error_message(kcontext, status, "LDAP %s", error_message(status));
-    return status;
-}
-
-krb5_error_code
 krb5_ldap_lock(krb5_context kcontext, int mode)
 {
     krb5_error_code status = KRB5_PLUGIN_OP_NOTSUPP;




More information about the cvs-krb5 mailing list