]> git.ipfire.org Git - thirdparty/bind9.git/commit
Remove "tkey-gssapi-credential" and related code
authorMichał Kępień <michal@isc.org>
Mon, 6 Oct 2025 11:19:50 +0000 (13:19 +0200)
committerMichał Kępień <michal@isc.org>
Mon, 6 Oct 2025 11:19:50 +0000 (13:19 +0200)
commit84b96df1532dd5982969e34ef9ac2d9c3d4fe218
treee06be23516d2442f9a3ae266ec7f3f67343e2c81
parent73197feec7709b164f9154b2a6d1e67747d86f97
Remove "tkey-gssapi-credential" and related code

Since the "tkey-gssapi-credential" statement has been previously
deprecated, mark it as ancient and remove all code related to it:

  - The code processing the "tkey-gssapi-credential" statement in the
    configuration is the only user of the dst_gssapi_acquirecred() and
    dst_gssapi_releasecred() functions, so remove them along with their
    static helper functions and a backup definition of the
    GSS_KRB5_MECHANISM macro.

  - When calling gss_accept_sec_context(), pass GSS_C_NO_CREDENTIAL
    instead of the credential acquired by gss_acquire_cred().
    (Previously, NULL was passed when "tkey-gssapi-credential" was not
    specified.  Kerberos headers define GSS_C_NO_CREDENTIAL as
    (gss_cred_id_t) 0, so the logic was effectively the same, but using
    the GSS_C_NO_CREDENTIAL macro is more appropriate.)  This renders
    the 'cred' parameter for dst_gssapi_acceptctx() redundant, so remove
    it from the prototype of the latter.  (Contrary to what the
    documentation for dst_gssapi_acceptctx() claims,
    dst_gssapi_releasecred() does not need to subsequently be called to
    free the GSS-API context; a dst_gssapi_deletectx() call in
    gssapi_destroy() takes care of that when the dynamically generated
    TSIG key is destroyed.)

  - Remove the 'gsscred' member from struct dns_tkeyctx, along with its
    related dns_gss_cred_id_t typedef.

Update the relevant sections of the ARM and code comments accordingly.

This makes the "tkey-gssapi-keytab" statement the only way to set up
GSS-TSIG in named.

Remove redundant code from bin/named/tkeyconf.c while at it.
12 files changed:
.gitlab-ci.yml
bin/named/config.c
bin/named/tkeyconf.c
doc/arm/reference.rst
doc/changelog/changelog-9.21.12.rst
doc/misc/options
doc/notes/notes-9.21.12.rst
lib/dns/gssapictx.c
lib/dns/include/dns/tkey.h
lib/dns/include/dst/gssapi.h
lib/dns/tkey.c
lib/isccfg/namedconf.c