(load_db): kadm5_server_handle_rec added for the new
osa_adb_open_policy calling sequence.
* kdb5_create.c: Comment about steps in creating a database updated to
include a step where the generation number is initialized. Call to
initialize the generation number upon creation of the master principal
added.
* kdb5_util.c: Changed to include server_internal.h instead of adb.h.
(open_db_and_mkey): kadm5_server_handle_rec added for the new
osa_adb_open_policy calling sequence.
* loadv4.c: Unimportant whitespace change in a comment.
git-svn-id: svn://anonsvn.mit.edu/krb5/branches/incremental-propagation-branch@13404
dc483132-0cff-0310-8789-
dd5450dbe970
+2001-06-20 Mitchell Berger <mitchb@mit.edu>
+
+ * dump.c: Changed to include server_internal.h instead of adb.h.
+ (load_db): kadm5_server_handle_rec added for the new
+ osa_adb_open_policy calling sequence.
+
+ * kdb5_create.c: Comment about steps in creating a database updated to
+ include a step where the generation number is initialized. Call to
+ initialize the generation number upon creation of the master principal
+ added.
+
+ * kdb5_util.c: Changed to include server_internal.h instead of adb.h.
+ (open_db_and_mkey): kadm5_server_handle_rec added for the new
+ osa_adb_open_policy calling sequence.
+
+ * loadv4.c: Unimportant whitespace change in a comment.
+
2001-06-20 Mitchell Berger <mitchb@mit.edu>
* kdb5_create.c (kdb5_create): Fixed typo in com_err message.
#include <stdio.h>
#include <k5-int.h>
#include <kadm5/admin.h>
-#include <kadm5/adb.h>
+#include <kadm5/server_internal.h>
#include <com_err.h>
#include "kdb5_util.h"
#if defined(HAVE_REGEX_H) && defined(HAVE_REGCOMP)
int update, verbose;
krb5_int32 crflags;
int aindex;
+ kadm5_server_handle_rec kadm5_handle;
/*
* Parse the arguments.
exit_status++;
goto error;
}
- if ((kret = osa_adb_open_policy(&tmppol_db, &newparams))) {
+
+ /* XXX Horrible kludge - to get generation number increases from policy
+ * from policy updates, the policy db handle needs a handle to the
+ * principal db so it can do a kdb_get_entry on the master principal.
+ * The context and params are the only things looked at.
+ */
+ kadm5_handle.context = kcontext;
+ kadm5_handle.params = global_params;
+ if ((kret = osa_adb_open_policy(&tmppol_db, &newparams, &kadm5_handle))) {
fprintf(stderr, "%s: %s while opening policy database\n",
programname, error_message(kret));
exit_status++;
*
* 2) get a realm name for the new db
*
- * 3) get a master password for the new db; convert to an encryption key.
+ * 3) get a master password for the new db; convert to an encryption key
*
* 4) create various required entries in the database
*
- * 5) close & exit
+ * 5) initialize the database generation number
+ *
+ * 6) close & exit
*/
extern krb5_keyblock master_keyblock;
&master_keyblock, NULL,
1, entry.key_data)))
return retval;
+ if ((retval = krb5_dbe_update_generation_number_general(util_context,
+ &entry, 1)))
+ return retval;
break;
case TGT_KEY:
iargs.ctx = context;
/*
- * admin/edit/kdb5_edit.c
+ * kadmin/dbutil/kdb5_util.c
*
- * (C) Copyright 1990,1991, 1996 by the Massachusetts Institute of Technology.
- * All Rights Reserved.
+ * (C) Copyright 1990,1991,1996,2001 by the Massachusetts Institute of
+ * Technology. All Rights Reserved.
*
* Export of this software from the United States of America may
* require a specific license from the United States Government.
#include <k5-int.h>
#include <kadm5/admin.h>
#include <krb5/adm_proto.h>
-#include <kadm5/adb.h>
+#include <kadm5/server_internal.h>
#include <time.h>
#include "kdb5_util.h"
int nentries;
krb5_boolean more;
krb5_data scratch, pwd, seed;
+ kadm5_server_handle_rec kadm5_handle;
dbactive = FALSE;
valid_master_key = 0;
exit_status++;
return(1);
}
- if ((retval = osa_adb_open_policy(&policy_db, &global_params))) {
+ /* XXX Horrible kludge. To get the generation number to increase from
+ * policy updates, the handle to the policy db needs a handle to the
+ * principal db so it can do a kdb_get_entry on the master principal.
+ * The only things it looks at are the context and params.
+ */
+ kadm5_handle.context = util_context;
+ kadm5_handle.params = global_params;
+ if ((retval = osa_adb_open_policy(&policy_db, &global_params,
+ &kadm5_handle))) {
com_err(progname, retval, "opening policy database");
exit_status++;
return (1);
/* Define to make certain blocks private */
#define V4_DECLARES_STATIC
#include "kdb5_util.h"
-#include "kadm5/adb.h" /* osa_adb_create_policy_db */
+#include "kadm5/adb.h" /* osa_adb_create_policy_db */
#include <netinet/in.h> /* ntohl */
#define PROGNAME argv[0]