Fix checks on allowed mechs
authorSimo Sorce <simo@redhat.com>
Tue, 7 Jul 2015 17:23:57 +0000 (13:23 -0400)
committerSimo Sorce <simo@redhat.com>
Tue, 7 Jul 2015 17:23:57 +0000 (13:23 -0400)
commit4e7967e797e5c8912a67c0de8f172bb95b5172ff
tree949409b5cce123862909fc16e505c66889d08da4
parent47de8ee6c742264ff03e9e3786cca3dabbedff4c
Fix checks on allowed mechs

We need to check if a mech is allowed against the desired_mechs set.
Otherwise in case the admin does not explicitly specify an allowed set
then all mechs are allowed, including NTLM. This causes annoying issues
with browsers like Firefox and Chrome/ium which end up popping up an
authentication dialog if they see NTLM is supported and they have no
Kerberos tickets around.
Authentication will then simply fail because NTLM is not actually supported.
By using desired_mechs we use a list of mechanism the machine actually
has a chance to support in the default case.

Signed-off-by: Simo Sorce <simo@redhat.com>
src/mod_auth_gssapi.c