Get rid of handling of set-but-unused kadm5_config_params.admin_lockfile
authorKen Raeburn <raeburn@mit.edu>
Tue, 10 Jun 2008 21:43:41 +0000 (21:43 +0000)
committerKen Raeburn <raeburn@mit.edu>
Tue, 10 Jun 2008 21:43:41 +0000 (21:43 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20381 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 ebd3037a3035abdd896d22ddc9c7d3ad1af57bb7..04a37957060812fa40e6fb938c84cf0ff7c78eeb 100644 (file)
@@ -1042,11 +1042,7 @@ static int parse_config_params(Tcl_Interp *interp, char *list,
          retcode = TCL_ERROR;
          goto finished;
      }
-     if ((retcode = parse_str(interp, argv[6], &params->admin_lockfile)) != TCL_OK) {
-         Tcl_AppendElement(interp, "while parsing admin_lockfile name");
-         retcode = TCL_ERROR;
-         goto finished;
-     }
+     /* 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");
          retcode = TCL_ERROR;
index adbd6c8cd02e445b5dedb704c149f9cd8faad0ca..8c8c23dea3a9411b1e70d67818a20f99458bf7a3 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * lib/kadm5/admin.h
  *
- * Copyright 2001 by the Massachusetts Institute of Technology.
+ * Copyright 2001, 2008 by the Massachusetts Institute of Technology.
  * All Rights Reserved.
  *
  * Export of this software from the United States of America may
@@ -228,7 +228,10 @@ typedef struct _kadm5_config_params {
 
      char *            dbname;
      char *            admin_dbname;
-     char *            admin_lockfile;
+
+     /* dummy fields to preserve abi for now */
+     char *            admin_lockfile_was_here;
+
      char *            admin_keytab;
      char *            acl_file;
      char *            dict_file;
index 2ecc13af6abffb53c5f472e4399def9de45a815d..f9c05d947a726fa33675e1238a71342aebd56993 100644 (file)
@@ -474,13 +474,9 @@ krb5_error_code kadm5_get_config_params(context, use_kdc_config,
            params.admin_dbname = NULL;
     }
 
-    if (params.mask & KADM5_CONFIG_ADBNAME) {
-       if (asprintf(&params.admin_lockfile, "%s.lock", params.admin_dbname) > 0)
-           params.mask |= KADM5_CONFIG_ADB_LOCKFILE;
-       else
-           params.admin_lockfile = NULL;
-    }
-    
+    params.admin_lockfile_was_here = NULL;
+    /* never set KADM5_CONFIG_ADB_LOCKFILE */
+
     /* Get the value for the admin (policy) database lock file*/
     hierarchy[2] = "admin_keytab";
     if (params_in->mask & KADM5_CONFIG_ADMIN_KEYTAB) {
@@ -762,7 +758,6 @@ kadm5_free_config_params(context, params)
        free(params->acl_file);
        free(params->realm);
        free(params->admin_dbname);
-       free(params->admin_lockfile);
     }
     return(0);
 }
index 4c0cb939d2034328bda28872c4a51003a7a25a07..e00e3e0553b12357aa921289c2209007731046e6 100644 (file)
@@ -234,7 +234,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_ADB_LOCKFILE | \
                         KADM5_CONFIG_ENCTYPE | \
                         KADM5_CONFIG_FLAGS | \
                         KADM5_CONFIG_MAX_LIFE | KADM5_CONFIG_MAX_RLIFE | \