From: Ezra Peisach Date: Tue, 26 Jun 2001 19:59:45 +0000 (+0000) Subject: * str_conv.c (krb5_string_to_keysalts): When parsing string, allow X-Git-Tag: krb5-1.3-alpha1~1283 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=dbf38dc1a9a91a268720652ead79c9266f190131;p=krb5.git * str_conv.c (krb5_string_to_keysalts): When parsing string, allow for extra separator characters (like spaces) between keysalts. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13507 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/kadm5/ChangeLog b/src/lib/kadm5/ChangeLog index 62f96202f..6332e90ec 100644 --- a/src/lib/kadm5/ChangeLog +++ b/src/lib/kadm5/ChangeLog @@ -1,3 +1,8 @@ +2001-06-26 Ezra Peisach + + * str_conv.c (krb5_string_to_keysalts): When parsing string, allow + for extra separator characters (like spaces) between keysalts. + 2001-06-21 Ezra Peisach * admin_internal.h (_KADM5_CHECK_HANDLE): Change code to ecode in diff --git a/src/lib/kadm5/str_conv.c b/src/lib/kadm5/str_conv.c index 99334e83c..4a2a67873 100644 --- a/src/lib/kadm5/str_conv.c +++ b/src/lib/kadm5/str_conv.c @@ -363,7 +363,22 @@ krb5_string_to_keysalts(string, tupleseps, ksaltseps, dups, ksaltp, nksaltp) if (ep) ep[-1] = trailchar; kp = ep; - } + + /* Skip over extra separators - like spaces */ + if (kp && *tseplist) { + septmp = tseplist; + while(*septmp && *kp) { + if(*septmp == *kp) { + /* Increment string - reset separator list */ + kp++; + septmp = tseplist; + } else { + septmp++; + } + } + if (!*kp) kp = NULL; + } + } /* while kp */ return(kret); }