Skip to content

Commit 9005c8d

Browse files
frozencemeterysimo5
authored andcommitted
Make requirement on gss_acquire_cred_with_password() hard
Not all uses of this function were previously guarded. It was added to MIT in 1.9 (2010), and to Heimdal in 2011. Signed-off-by: Robbie Harwood <rharwood@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
1 parent 6862859 commit 9005c8d

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

configure.ac

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,10 @@ AC_CHECK_LIB([gssapi_krb5], [gss_accept_sec_context], [],
8080
[AC_MSG_ERROR([GSSAPI library check failed])])
8181
AC_CHECK_FUNCS(gss_krb5_ccache_name, [],
8282
[AC_MSG_ERROR([gss_krb5_ccache_name() not found])])
83+
AC_CHECK_FUNCS(gss_acquire_cred_with_password, [],
84+
[AC_MSG_ERROR([gss_acquire_with_password() not found])])
8385
AC_CHECK_FUNCS(gss_acquire_cred_from)
8486
AC_CHECK_FUNCS(gss_store_cred_into)
85-
AC_CHECK_FUNCS(gss_acquire_cred_with_password)
8687

8788
AC_SUBST([GSSAPI_CFLAGS])
8889
AC_SUBST([GSSAPI_LIBS])

src/mod_auth_gssapi.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1593,15 +1593,13 @@ static const char *mag_deleg_ccache_perms(cmd_parms *parms, void *mconfig,
15931593
}
15941594
#endif
15951595

1596-
#ifdef HAVE_GSS_ACQUIRE_CRED_WITH_PASSWORD
15971596
static const char *mag_use_basic_auth(cmd_parms *parms, void *mconfig, int on)
15981597
{
15991598
struct mag_config *cfg = (struct mag_config *)mconfig;
16001599

16011600
cfg->use_basic_auth = on ? true : false;
16021601
return NULL;
16031602
}
1604-
#endif
16051603

16061604
static bool mag_list_of_mechs(cmd_parms *parms, gss_OID_set *oidset,
16071605
const char *w)
@@ -1753,7 +1751,6 @@ static const char *required_name_attrs(cmd_parms *parms, void *mconfig,
17531751
return NULL;
17541752
}
17551753

1756-
#ifdef HAVE_GSS_ACQUIRE_CRED_WITH_PASSWORD
17571754
static const char *mag_basic_auth_mechs(cmd_parms *parms, void *mconfig,
17581755
const char *w)
17591756
{
@@ -1764,7 +1761,6 @@ static const char *mag_basic_auth_mechs(cmd_parms *parms, void *mconfig,
17641761

17651762
return NULL;
17661763
}
1767-
#endif
17681764

17691765
static const char *mag_acceptor_name(cmd_parms *parms, void *mconfig,
17701766
const char *w)
@@ -1848,12 +1844,10 @@ static const command_rec mag_commands[] = {
18481844
"Do impersonation call (S4U2Self) "
18491845
"based on already authentication username"),
18501846
#endif
1851-
#ifdef HAVE_GSS_ACQUIRE_CRED_WITH_PASSWORD
18521847
AP_INIT_FLAG("GssapiBasicAuth", mag_use_basic_auth, NULL, OR_AUTHCFG,
18531848
"Allows use of Basic Auth for authentication"),
18541849
AP_INIT_ITERATE("GssapiBasicAuthMech", mag_basic_auth_mechs, NULL,
18551850
OR_AUTHCFG, "Mechanisms to use for basic auth"),
1856-
#endif
18571851
AP_INIT_ITERATE("GssapiAllowedMech", mag_allow_mech, NULL, OR_AUTHCFG,
18581852
"Allowed Mechanisms"),
18591853
AP_INIT_FLAG("GssapiNegotiateOnce", mag_negotiate_once, NULL, OR_AUTHCFG,

0 commit comments

Comments
 (0)