[krbdev.mit.edu #6754] Patch for compilation failure with --with-kdc-kdb-update configure option in krb5 1.6.4-beta
The RT System itself via RT
rt-comment at krbdev.mit.edu
Tue Aug 3 15:59:34 EDT 2010
>From krb5-bugs-incoming-bounces at PCH.mit.edu Tue Aug 3 15:59:33 2010
Return-Path: <krb5-bugs-incoming-bounces at PCH.mit.edu>
Received: from pch.mit.edu (PCH.MIT.EDU [18.7.21.90])
by krbdev.mit.edu (Postfix) with ESMTP id 7FF3C3DFCD;
Tue, 3 Aug 2010 15:59:33 -0400 (EDT)
Received: from pch.mit.edu (pch.mit.edu [127.0.0.1])
by pch.mit.edu (8.13.6/8.12.8) with ESMTP id o73JxXm9017561;
Tue, 3 Aug 2010 15:59:33 -0400
Received: from mailhub-dmz-2.mit.edu (MAILHUB-DMZ-2.MIT.EDU [18.7.62.37])
by pch.mit.edu (8.13.6/8.12.8) with ESMTP id o6R6MFsN002567
for <krb5-bugs-incoming at PCH.mit.edu>; Tue, 27 Jul 2010 02:22:15 -0400
Received: from dmz-mailsec-scanner-4.mit.edu (DMZ-MAILSEC-SCANNER-4.MIT.EDU
[18.9.25.15])
by mailhub-dmz-2.mit.edu (8.13.8/8.9.2) with ESMTP id o6R6M8fm017553
for <krb5-bugs at mit.edu>; Tue, 27 Jul 2010 02:22:15 -0400
X-AuditID: 1209190f-b7b0aae000000a7d-7d-4c4e7b1aa025
Received: from scs.synovel.com (scs.synovel.com [69.197.183.198])
by dmz-mailsec-scanner-4.mit.edu (Symantec Brightmail Gateway) with
SMTP id DB.3F.02685.A1B7E4C4; Tue, 27 Jul 2010 02:22:18 -0400 (EDT)
Received: from localhost (localhost.localdomain [127.0.0.1])
by scs.synovel.com (Postfix) with ESMTP id 7B7DFD7A001
for <krb5-bugs at mit.edu>; Tue, 27 Jul 2010 11:52:13 +0530 (IST)
X-Virus-Scanned: Debian amavisd-new at scs.synovel.com
Received: from scs.synovel.com ([127.0.0.1])
by localhost (scs.synovel.com [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id xIO8BDcBbGIN for <krb5-bugs at mit.edu>;
Tue, 27 Jul 2010 11:52:07 +0530 (IST)
Received: by scs.synovel.com (Postfix, from userid 115)
id 876A6D7A002; Tue, 27 Jul 2010 11:52:07 +0530 (IST)
Received: from synovel103.synovel.pvt (unknown [122.169.252.102])
by scs.synovel.com (Postfix) with ESMTP id AA8D9D7A001
for <krb5-bugs at mit.edu>; Tue, 27 Jul 2010 11:52:06 +0530 (IST)
Received: by synovel103.synovel.pvt (Postfix, from userid 1001)
id 59566E2E7D; Tue, 27 Jul 2010 11:52:06 +0530 (IST)
To: krb5-bugs at mit.edu
Subject: Patch for compilation failure with --with-kdc-kdb-update configure
option in krb5 1.6.4-beta
From: rahul at synovel.com
X-send-pr-version: 3.99
Message-Id: <20100727062206.59566E2E7D at synovel103.synovel.pvt>
Date: Tue, 27 Jul 2010 11:52:06 +0530 (IST)
X-Brightmail-Tracker: AAAAAA==
X-Mailman-Approved-At: Tue, 03 Aug 2010 15:59:31 -0400
X-BeenThere: krb5-bugs-incoming at mailman.mit.edu
X-Mailman-Version: 2.1.6
Precedence: list
Reply-To: rahul at synovel.com
Sender: krb5-bugs-incoming-bounces at PCH.mit.edu
Errors-To: krb5-bugs-incoming-bounces at PCH.mit.edu
>Submitter-Id: net
>Originator: Rahul Amaram
>Organization:
Synovel Software Technologies Pvt. Ltd.
>Confidential: no
>Synopsis: Patch for compilation failure with --with-kdc-kdb-update configure option in krb5 1.6.4-beta
>Severity: non-critical
>Priority: medium
>Category: krb5-kdc
>Class: sw-bug
>Release: 1.6.4-beta1
>Environment:
System: Linux Synovel103 2.6.26-2-amd64 #1 SMP Wed May 12 18:03:14 UTC 2010 x86_64 GNU/Linux
>Description:
Compiling with --with-kdc-kdb-update configure option fails as below:
# ./configure --with-kdc-kdb-update && make
...
...
...
gcc -L../lib -g -O2 -Wall -Wmissing-prototypes -Wcast-qual -Wcast-align -Wconversion -Wshadow -o krb5kdc kdc5_err.o dispatch.o do_as_req.o do_tgs_req.o kdc_util.o kdc_preauth.o main.o network.o policy.o extern.o replay.o kerberos_v4.o -lkadm5srv -lkdb5 -lgssrpc -lgssapi_krb5 -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err -lkrb5support -lkeyutils -lresolv -ldl -lapputils
do_as_req.o: In function `process_as_req':
/tmp/krb5-1.6.dfsg.4~beta1/src/kdc/do_as_req.c:489: undefined reference to `krb5_db_set_name'
/tmp/krb5-1.6.dfsg.4~beta1/src/kdc/do_as_req.c:491: undefined reference to `krb5_db_init'
collect2: ld returned 1 exit status
make[1]: *** [krb5kdc] Error 1
>How-To-Repeat:
See the above description.
>Fix:
Apply the below patch. This patch has been backported from 1.7.1 (http://src.mit.edu/fisheye/changelog/krb5/?cs=23647). The issue has been discussed in more detail at http://krbdev.mit.edu/rt/Ticket/Display.html?user=guest&pass=guest&id=5668.
diff -Naur krb5-1.6.dfsg.4~beta1/src/kdc/do_as_req.c krb5-1.6.dfsg.4~beta1.new/src/kdc/do_as_req.c
--- krb5-1.6.dfsg.4~beta1/src/kdc/do_as_req.c 2008-05-29 03:10:12.000000000 +0530
+++ krb5-1.6.dfsg.4~beta1.new/src/kdc/do_as_req.c 2010-07-26 20:35:02.000000000 +0530
@@ -480,15 +480,16 @@
if (c_nprincs) {
#ifdef KRBCONF_KDC_MODIFIES_KDB
if (update_client) {
+ krb5_error_code errcode2;
+
krb5_db_put_principal(kdc_context, &client, &c_nprincs);
/*
* ptooey. We want krb5_db_sync() or something like that.
*/
- krb5_db_fini(kdc_context);
- if (kdc_active_realm->realm_dbname)
- krb5_db_set_name(kdc_active_realm->realm_context,
- kdc_active_realm->realm_dbname);
- krb5_db_init(kdc_context);
+ errcode2 = krb5_db_fini(kdc_context);
+ if (errcode2 == 0)
+ errcode2 = krb5_db_open(kdc_context, db_args,
+ KRB5_KDB_OPEN_RW|KRB5_KDB_SRV_TYPE_KDC);
/* Reset master key */
krb5_db_set_mkey(kdc_context, &kdc_active_realm->realm_mkey);
}
diff -Naur krb5-1.6.dfsg.4~beta1/src/kdc/extern.h krb5-1.6.dfsg.4~beta1.new/src/kdc/extern.h
--- krb5-1.6.dfsg.4~beta1/src/kdc/extern.h 2008-05-29 03:10:12.000000000 +0530
+++ krb5-1.6.dfsg.4~beta1.new/src/kdc/extern.h 2010-07-26 20:36:02.000000000 +0530
@@ -93,6 +93,7 @@
extern krb5_timestamp kdc_infinity; /* greater than all other timestamps */
extern krb5_rcache kdc_rcache; /* replay cache */
extern krb5_keyblock psr_key; /* key for predicted sam response */
+extern char **db_args;
extern volatile int signal_requests_exit;
extern volatile int signal_requests_hup;
diff -Naur krb5-1.6.dfsg.4~beta1/src/kdc/main.c krb5-1.6.dfsg.4~beta1.new/src/kdc/main.c
--- krb5-1.6.dfsg.4~beta1/src/kdc/main.c 2008-05-29 03:10:12.000000000 +0530
+++ krb5-1.6.dfsg.4~beta1.new/src/kdc/main.c 2010-07-26 20:40:40.000000000 +0530
@@ -410,6 +410,7 @@
return;
}
+char **db_args = NULL;
void
initialize_realms(krb5_context kcontext, int argc, char **argv)
{
@@ -426,7 +427,6 @@
char *default_tcp_ports = 0;
krb5_pointer aprof;
const char *hierarchy[3];
- char **db_args = NULL;
int db_args_size = 0;
#ifdef KRB5_KRB4_COMPAT
More information about the krb5-bugs
mailing list