Get rid of handling of set-but-unused kadm5_config_params.admin_dbname
authorKen Raeburn <raeburn@mit.edu>
Tue, 10 Jun 2008 22:03:01 +0000 (22:03 +0000)
committerKen Raeburn <raeburn@mit.edu>
Tue, 10 Jun 2008 22:03:01 +0000 (22:03 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20383 dc483132-0cff-0310-8789-dd5450dbe970

src/kadmin/testing/util/tcl_kadm5.c
src/lib/kadm5/admin.h
src/lib/kadm5/alt_prof.c
src/lib/kadm5/srv/server_init.c

index 04a37957060812fa40e6fb938c84cf0ff7c78eeb..a852f26a51fea06d8b4d0d869dc5154ed96cb0a4 100644 (file)
@@ -1037,11 +1037,7 @@ static int parse_config_params(Tcl_Interp *interp, char *list,
          retcode = TCL_ERROR;
          goto finished;
      }
-     if ((retcode = parse_str(interp, argv[5], &params->admin_dbname)) != TCL_OK) {
-         Tcl_AppendElement(interp, "while parsing admin_dbname name");
-         retcode = TCL_ERROR;
-         goto finished;
-     }
+     /* Ignore argv[5], which used to set the admin_dbname field.  */
      /* Ignore argv[6], which used to set the admin_lockfile field.  */
      if ((retcode = parse_str(interp, argv[7], &params->admin_keytab)) != TCL_OK) {
          Tcl_AppendElement(interp, "while parsing admin_keytab name");
index 8c8c23dea3a9411b1e70d67818a20f99458bf7a3..13ffc1b01262bccdb47a9f0bd0261e0844c9ee29 100644 (file)
@@ -227,9 +227,9 @@ typedef struct _kadm5_config_params {
 #endif
 
      char *            dbname;
-     char *            admin_dbname;
 
      /* dummy fields to preserve abi for now */
+     char *            admin_dbname_was_here;
      char *            admin_lockfile_was_here;
 
      char *            admin_keytab;
index f9c05d947a726fa33675e1238a71342aebd56993..df89ccf8724efc8ccb51a5c13123222f5f2589d1 100644 (file)
@@ -464,18 +464,9 @@ krb5_error_code kadm5_get_config_params(context, use_kdc_config,
              params.mask |= KADM5_CONFIG_DBNAME;
     }
 
-    /*
-     * admin database name and lockfile are now always derived from dbname
-     */
-    if (params.mask & KADM5_CONFIG_DBNAME) {
-       if (asprintf(&params.admin_dbname, "%s.kadm5", params.dbname) > 0)
-           params.mask |= KADM5_CONFIG_ADBNAME;
-       else
-           params.admin_dbname = NULL;
-    }
-
+    params.admin_dbname_was_here = NULL;
     params.admin_lockfile_was_here = NULL;
-    /* never set KADM5_CONFIG_ADB_LOCKFILE */
+    /* never set KADM5_CONFIG_ADBNAME, KADM5_CONFIG_ADB_LOCKFILE */
 
     /* Get the value for the admin (policy) database lock file*/
     hierarchy[2] = "admin_keytab";
@@ -757,7 +748,6 @@ kadm5_free_config_params(context, params)
        free(params->dict_file);
        free(params->acl_file);
        free(params->realm);
-       free(params->admin_dbname);
     }
     return(0);
 }
index e00e3e0553b12357aa921289c2209007731046e6..dbb7ff78e635c145b98aec025b10a5ce48519af5 100644 (file)
@@ -233,7 +233,6 @@ kadm5_ret_t kadm5_init(char *client_name, char *pass,
      }
 
 #define REQUIRED_PARAMS (KADM5_CONFIG_REALM | KADM5_CONFIG_DBNAME | \
-                        KADM5_CONFIG_ADBNAME | \
                         KADM5_CONFIG_ENCTYPE | \
                         KADM5_CONFIG_FLAGS | \
                         KADM5_CONFIG_MAX_LIFE | KADM5_CONFIG_MAX_RLIFE | \