[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Server-realm configuration stanzas.
From: |
Mats Erik Andersson |
Subject: |
Re: Server-realm configuration stanzas. |
Date: |
Thu, 23 Aug 2012 23:32:19 +0200 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
A good thing that the suggested patch was not pushed,
since it still relies on non-portable behaviour of
getsubopt(), a behaviour which is present in the
official code already.
In shishi_cfg() it is vital that "getsubopt(, , &value) == -1"
still leaves "value" with a valid content. This is true for
glibc and Solaris libc, but is false for FreeBSD libc.
In consequence, FreeBSD has never been able to determine
"realm-kdc" configurations, much less "server-realm".
The new patch-suggestion has been verified for GNU/Linux,
OpenSolaris, and FreeBSD 8.2, providing full functionality
in shishi_realm_for_server(), in configuration as well as
using network lookup.
The portable remedy is to observe that
getsubopt(&p, &table, &value)
returns the primary option content in "value"
and all suboptions as an untouched string in "p".
Thus the parser does better in accepting the duty
of parsing the contents in "p", as each of the
cases REALM_KDC_OPTION and SERVER_REALM_OPTION
dictate, not falling back on some trickery based
on a finite state automata in the catch-all case
at the very end of the rope.
Best regards,
Mats Erik Andersson
0001-Configuration-parsing-of-suboptions.patch
Description: Text Data