From: Ezra Peisach Date: Wed, 2 Aug 2000 13:57:32 +0000 (+0000) Subject: * krb5.conf: Test with a space after ']' and '{' X-Git-Tag: krb5-1.3-alpha1~1945 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6289a16a7634265a5161a6b2f94d518938aab692;p=krb5.git * krb5.conf: Test with a space after ']' and '{' * prof_parse.c (parse_std_line): Spaces after '{' or ']' should not be a fatal error. This is a common lossage in krb5.conf files. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12595 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/util/profile/ChangeLog b/src/util/profile/ChangeLog index a0f2b79ea..b3993c6da 100644 --- a/src/util/profile/ChangeLog +++ b/src/util/profile/ChangeLog @@ -1,3 +1,10 @@ +2000-08-02 Ezra Peisach + + * krb5.conf: Test with a space after ']' and '{' + + * prof_parse.c (parse_std_line): Spaces after '{' or ']' should + not be a fatal error. This is a common lossage in krb5.conf files. + 2000-07-24 Ezra Peisach * prof_init.c: Cleanup internal type warnings in calls to profile_init. diff --git a/src/util/profile/krb5.conf b/src/util/profile/krb5.conf index 01eb66ce8..8b46c95fe 100644 --- a/src/util/profile/krb5.conf +++ b/src/util/profile/krb5.conf @@ -8,8 +8,8 @@ kdc_timesync = 1 ccache_type = 4 -[realms] - ATHENA.MIT.EDU = { +[realms] + ATHENA.MIT.EDU = { # kdc = kerberos-2000.mit.edu kdc = kerberos.mit.edu:88 kdc = kerberos-1.mit.edu:88 diff --git a/src/util/profile/prof_parse.c b/src/util/profile/prof_parse.c index 0e3cffe74..7e8bcb873 100644 --- a/src/util/profile/prof_parse.c +++ b/src/util/profile/prof_parse.c @@ -130,6 +130,10 @@ static errcode_t parse_std_line(line, state) profile_make_node_final(state->current_section); cp++; } + /* + * A space after ']' should not be fatal + */ + cp = skip_over_blanks(cp); if (*cp) return PROF_SECTION_SYNTAX; return 0; @@ -169,7 +173,7 @@ static errcode_t parse_std_line(line, state) } else if (value[0] == 0) { do_subsection++; state->state = STATE_GET_OBRACE; - } else if (value[0] == '{' && value[1] == 0) + } else if (value[0] == '{' && *(skip_over_blanks(value+1)) == 0) do_subsection++; else { cp = value + strlen(value) - 1;