From 88e892332063c950a7ceb0ee632fee6174da72c1 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Tue, 10 Jun 2008 21:43:41 +0000 Subject: [PATCH] Get rid of handling of set-but-unused kadm5_config_params.admin_lockfile git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20381 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kadmin/testing/util/tcl_kadm5.c | 6 +----- src/lib/kadm5/admin.h | 7 +++++-- src/lib/kadm5/alt_prof.c | 11 +++-------- src/lib/kadm5/srv/server_init.c | 1 - 4 files changed, 9 insertions(+), 16 deletions(-) diff --git a/src/kadmin/testing/util/tcl_kadm5.c b/src/kadmin/testing/util/tcl_kadm5.c index ebd3037a3..04a379570 100644 --- a/src/kadmin/testing/util/tcl_kadm5.c +++ b/src/kadmin/testing/util/tcl_kadm5.c @@ -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], ¶ms->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], ¶ms->admin_keytab)) != TCL_OK) { Tcl_AppendElement(interp, "while parsing admin_keytab name"); retcode = TCL_ERROR; diff --git a/src/lib/kadm5/admin.h b/src/lib/kadm5/admin.h index adbd6c8cd..8c8c23dea 100644 --- a/src/lib/kadm5/admin.h +++ b/src/lib/kadm5/admin.h @@ -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; diff --git a/src/lib/kadm5/alt_prof.c b/src/lib/kadm5/alt_prof.c index 2ecc13af6..f9c05d947 100644 --- a/src/lib/kadm5/alt_prof.c +++ b/src/lib/kadm5/alt_prof.c @@ -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(¶ms.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); } diff --git a/src/lib/kadm5/srv/server_init.c b/src/lib/kadm5/srv/server_init.c index 4c0cb939d..e00e3e055 100644 --- a/src/lib/kadm5/srv/server_init.c +++ b/src/lib/kadm5/srv/server_init.c @@ -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 | \ -- 2.26.2