summaryrefslogtreecommitdiffstats
path: root/src/kdc
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2013-01-11 10:13:25 -0500
committerGreg Hudson <ghudson@mit.edu>2013-01-11 12:27:43 -0500
commit6338d039cbd0b138642e3b123ac58dc802d1d907 (patch)
tree1a8c6b7b88d1c0685d025c9bc0b96bda5e3d18db /src/kdc
parent1ea0e29dc8e89fe6cf0f43305cb52c9e2fe6a58f (diff)
downloadkrb5-6338d039cbd0b138642e3b123ac58dc802d1d907.tar.gz
krb5-6338d039cbd0b138642e3b123ac58dc802d1d907.tar.xz
krb5-6338d039cbd0b138642e3b123ac58dc802d1d907.zip
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. ticket: 7539 (new) target_version: 1.11.1 tags: pullup
Diffstat (limited to 'src/kdc')
-rw-r--r--src/kdc/main.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/kdc/main.c b/src/kdc/main.c
index 02d7c3372c..51792fbccf 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),