[27543] in CVS-changelog-for-Kerberos-V5
krb5 commit [krb5-1.11]: Fix no_host_referral concatention in KDC
daemon@ATHENA.MIT.EDU (Tom Yu)
Thu Jan 31 17:55:06 2013
Date: Thu, 31 Jan 2013 17:55:03 -0500
From: Tom Yu <tlyu@mit.edu>
Message-Id: <201301312255.r0VMt3Im014833@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu
https://github.com/krb5/krb5/commit/0a6c875c2ed7c253a075354992dfa1d92a12956f
commit 0a6c875c2ed7c253a075354992dfa1d92a12956f
Author: Greg Hudson <ghudson@mit.edu>
Date: Fri Jan 11 10:13:25 2013 -0500
Fix no_host_referral concatention in KDC
If no_host_referral is set in both [kdcdefaults] and the realm
subsection, we're supposed to concatenate their values. But the logic
in handle_referral_params would overwrite the value with the
non-concatenated realm value. Similar bugs of this nature were fixed
in 639c9d0f5a7c68dc98a2a452abc05ca32443cddf (r22037) but this one was
missed.
(cherry picked from commit 6338d039cbd0b138642e3b123ac58dc802d1d907)
ticket: 7539
version_fixed: 1.11.1
status: resolved
src/kdc/main.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/kdc/main.c b/src/kdc/main.c
index f06263e..1624046 100644
--- a/src/kdc/main.c
+++ b/src/kdc/main.c
@@ -189,12 +189,13 @@ handle_referral_params(krb5_realm_params *rparams,
rdp->realm_no_host_referral = strdup(KRB5_CONF_ASTERISK);
if (!rdp->realm_no_host_referral)
retval = ENOMEM;
- } else if (no_refrls && (asprintf(&(rdp->realm_no_host_referral),
- "%s%s%s%s%s", " ", no_refrls," ",
- rparams->realm_no_host_referral, " ") < 0))
- retval = ENOMEM;
- else if (asprintf(&(rdp->realm_no_host_referral),"%s%s%s", " ",
- rparams->realm_no_host_referral, " ") < 0)
+ } else if (no_refrls) {
+ if (asprintf(&(rdp->realm_no_host_referral),
+ "%s%s%s%s%s", " ", no_refrls," ",
+ rparams->realm_no_host_referral, " ") < 0)
+ retval = ENOMEM;
+ } else if (asprintf(&(rdp->realm_no_host_referral),"%s%s%s", " ",
+ rparams->realm_no_host_referral, " ") < 0)
retval = ENOMEM;
} else if( no_refrls != NULL) {
if ( asprintf(&(rdp->realm_no_host_referral),
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5