From 98895fc738671eed787e5049e69ffdd2b1f7ac91 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Fri, 18 Jul 2008 06:00:10 +0000 Subject: [PATCH] Rewrite krb5_db_open flag handling to avoid confusing emacs c-mode indentation support. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20539 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kdc/main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/kdc/main.c b/src/kdc/main.c index 5540c18a3..ff675dcae 100644 --- a/src/kdc/main.c +++ b/src/kdc/main.c @@ -1,7 +1,7 @@ /* * kdc/main.c * - * Copyright 1990,2001 by the Massachusetts Institute of Technology. + * Copyright 1990,2001,2008 by the Massachusetts Institute of Technology. * * Export of this software from the United States of America may * require a specific license from the United States Government. @@ -154,6 +154,7 @@ init_realm(char *progname, kdc_realm_t *rdp, char *realm, krb5_error_code kret; krb5_boolean manual; krb5_realm_params *rparams; + int kdb_open_flags; memset((char *) rdp, 0, sizeof(kdc_realm_t)); if (!realm) { @@ -239,13 +240,12 @@ init_realm(char *progname, kdc_realm_t *rdp, char *realm, } /* first open the database before doing anything */ -#ifdef KRBCONF_KDC_MODIFIES_KDB - if ((kret = krb5_db_open(rdp->realm_context, db_args, - KRB5_KDB_OPEN_RW | KRB5_KDB_SRV_TYPE_KDC))) { +#ifdef KRBCONF_KDC_MODIFIES_KDB + kdb_open_flags = KRB5_KDB_OPEN_RW | KRB5_KDB_SRV_TYPE_KDC; #else - if ((kret = krb5_db_open(rdp->realm_context, db_args, - KRB5_KDB_OPEN_RO | KRB5_KDB_SRV_TYPE_KDC))) { + kdb_open_flags = KRB5_KDB_OPEN_RO | KRB5_KDB_SRV_TYPE_KDC; #endif + if ((kret = krb5_db_open(rdp->realm_context, db_args, kdb_open_flags))) { com_err(progname, kret, "while initializing database for realm %s", realm); goto whoops; -- 2.26.2