#
# This patch provides support for trimming characters after a port
# specification like:
# kdc = foo.com:3434 # trailing comment
#
# MIT has said they have never supported comments after parameter assignments
# so this is Solaris only for now.
# Patch source: in-house
#
--- a/src/lib/krb5/os/locate_kdc.c
+++ b/src/lib/krb5/os/locate_kdc.c
@@ -270,6 +270,9 @@ locate_srv_conf_1(krb5_context context, const krb5_data *realm,
if (port) {
unsigned long l;
char *endptr;
+
+ cp = port + strcspn(port, " \t#");
+ *cp = '\0';
l = strtoul (port, &endptr, 10);
if (endptr == NULL || *endptr != 0)
return EINVAL;