<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/kerberos5, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=main</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2025-10-05T16:18:35Z</updated>
<entry>
<title>heimdal-kadmin: Add support for the -f dump option</title>
<updated>2025-10-05T16:18:35Z</updated>
<author>
<name>Rick Macklem</name>
<email>rmacklem@FreeBSD.org</email>
</author>
<published>2025-10-05T16:18:35Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=5000d023a446b81f6d45ed59aa379607ec814f01'/>
<id>urn:sha1:5000d023a446b81f6d45ed59aa379607ec814f01</id>
<content type='text'>
The "-f" dump option allows a dump of the Heimdal
KDC in a format that the MIT kdb5_util command can
load into a MIT KDC's database.
This makes transitioning from the Heimdal KDC to
the current MIT one feasible without having to
re-create the KDC database from scratch.

glebius@ did the initial work, cherry picking these
commits from the Heimdal sources on github and then doing
extensive merge conflict resolution and other fixes so
that it would build.
Heimdal commit fca5399 authored by Nico Williams:
Initial commit for second approach for multiple kvno.  NOT TESTED!

Heimdal commit 57f1545 authored by Nico Williams:
Add support for writing to KDB and dumping HDB to MIT KDB dump format
    Before this change Heimdal could read KDBs.  Now it can write to
    them too.

    Heimdal can now also dump HDBs (including KDBs) in MIT format,
    which can then be imported with kdb5_util load.

    This is intended to help in migrations from MIT to Heimdal by
    allowing migrations from Heimdal to MIT so that it is possible
    to rollback from Heimdal to MIT should there be any issues.  The
    idea is to allow a) running Heimdal kdc/kadmind with a KDB, or
    b) running Heimdal with an HDB converted from a KDB and then
    rollback by dumping the HDB and loading a KDB.

    Note that not all TL data types are supported, only two: last
    password change and modify-by.  This is the minimum necessary.
    PKINIT users may need to add support for KRB5_TL_USER_CERTIFICATE,
    and for databases with K/M history we may need to add KRB5_TL_MKVNO
    support.

This resulted in a Heimdal kadmin that would dump
the KDC database in MIT format.  However, there
were issues when this dump was loaded into the
current MIT KDC in FreeBSD current/15.0.

The changes I did to make the dump more useful are listed below:
When "-f MIT" is used for "kadmin -l dump" it writes
the dump out in MIT format.  This dump format is understood
by the MIT kdb5_util command.  The patch modifies the above
so that the MIT KDC's master key keytab file can be provided
as the argument to "-f" so that the principals are re-encrypted in
it. This allows any principal with at least one strong encryption
type key to work without needing a change_password.
The strong encryption types supported by the Heimdal KDC are:
aes256-cts-hmac-sha1-96
aes128-cts-hmac-sha1-96

The issues my changes address are:
- If there are weak encryption keys in a principal's entry,
  MIT's kadmin.local will report that the principcal's entry
  is incomplete or corrupted.
- The keys are encrypted in Heimdal's master key.  The
  "-d" option can be used on the "kadmin -l dump" to
  de-encrypt them, but the passwords will not work on the
  current MIT KDC.

To try and deal with the above issues, this patch modied the above to:
- Does not dump the weak keys.
- Re-encrypts the strong keys in MIT's master key if the argument
  to "-f" is actually a filename which holds the MIT KDC's
  master key keytab and not "MIT".
- For principals that only have weak keys, it generates
  a fake strong key. This key will not work on the MIT
  KDC, but the principal entry will work once a
  change_password is done to it.
- It always generates a "modified_by" entry, faking one if
  not already present in the Heimdal KDC database.
  This was necessary, since the MIT kadmin will
  report that the principal entry is "incomplete or
  corrupted" without one.

It also fixed a problem where "get principal" no longer
worked after the initial patch was applied.

A man page update will be done as a separate commit.

I believe this commit is acceptable since the Heimdal
sources are now essentially deprecated in favor of the
MIT sources and that this new "-f" patch simplifies
the transition to the MIT KDC.

Discussed with:	glebius, cy
MFC after:	3 days
</content>
</entry>
<entry>
<title>kerberos5: Fix the Heimdal pkgbase build</title>
<updated>2025-09-04T13:53:02Z</updated>
<author>
<name>Lexi Winter</name>
<email>ivy@FreeBSD.org</email>
</author>
<published>2025-09-04T13:53:02Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=7e97c6adffde3bd6f60f042ed2603335c005c6a7'/>
<id>urn:sha1:7e97c6adffde3bd6f60f042ed2603335c005c6a7</id>
<content type='text'>
When LIB_PACKAGE was added, MIT Kerberos was updated to use it but
Heimdal was not, so it still used PACKAGE=kerberos-lib.  Since we
deleted kerberos-lib-all.ucl, this caused update-packages to fail
when WITHOUT_MITKRB5 is set.

Change the Heimdal libraries to use LIB_PACKAGE by setting this in
kerberos5/lib/Makefile.inc, and remove PACKAGE=kerberos-lib from the
individual Makefiles for each library.  This means Heimdal gets the
same set of packages as MIT Kerberos, except for kerberos-kdc which
we don't create for Heimdal.

Fixes:	929f5966a9fd ("packages: Improve handling of -lib packages")
Reported by:	jlduran
Reviewed by:	jlduran, cy
Differential Revision:	https://reviews.freebsd.org/D52371
</content>
</entry>
<entry>
<title>heimdal: fix wrt OpenSSL 3.5</title>
<updated>2025-08-25T17:12:52Z</updated>
<author>
<name>Gleb Smirnoff</name>
<email>glebius@FreeBSD.org</email>
</author>
<published>2025-08-25T17:12:52Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=9ab31f821ad1c6bad474510447387c50bef2c24c'/>
<id>urn:sha1:9ab31f821ad1c6bad474510447387c50bef2c24c</id>
<content type='text'>
- Bump the library version.
- Don't load the legacy provider.  It is no longer enabled by default
  and looks like kdc doesn't actually need it.

Reviewed by:		cy
Differential Revision:	https://reviews.freebsd.org/D52114
</content>
</entry>
<entry>
<title>Remove MK_GSSAPI</title>
<updated>2025-08-20T18:42:20Z</updated>
<author>
<name>Lexi Winter</name>
<email>ivy@FreeBSD.org</email>
</author>
<published>2025-08-20T18:42:20Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=dc5ba6b8b4f028eb944434be82838d272330f26f'/>
<id>urn:sha1:dc5ba6b8b4f028eb944434be82838d272330f26f</id>
<content type='text'>
For MIT Kerberos, MK_GSSAPI has no meaning: GSSAPI is a required part of
Kerberos and is always built if MK_KERBEROS is enabled.  Backport this
behaviour to Heimdal so it works the same way.

While here, change Heimdal's libcom_err and compile_et to be selected by
MK_KERBEROS, not MK_KERBEROS_SUPPORT, since these are part of Kerberos
and third-party users might need it even if Kerberos support is disabled
in the base system.  This means MK_KERBEROS_SUPPORT installs the same
files with both MIT and Heimdal.

Reviewed by:	cy
Differential Revision:	https://reviews.freebsd.org/D51859
</content>
</entry>
<entry>
<title>build: remove the last vestiges of lint support</title>
<updated>2025-06-05T23:55:34Z</updated>
<author>
<name>Brooks Davis</name>
<email>brooks@FreeBSD.org</email>
</author>
<published>2025-06-05T23:55:34Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8e35800732573de6c4bc1dd3ac420447fca96231'/>
<id>urn:sha1:8e35800732573de6c4bc1dd3ac420447fca96231</id>
<content type='text'>
Commit 1cbb58886a47 (shipped in 12.0.0) removed all lint infrastructure.
A bunch of NO_LINT definitions remained (perhaps as a bootstrapping
measture).  Remove them.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D50704
</content>
</entry>
<entry>
<title>kerberos5, libcom_err, others: append to LDFLAGS instead of replacing</title>
<updated>2025-04-05T21:19:57Z</updated>
<author>
<name>Chuck Silvers</name>
<email>chs@FreeBSD.org</email>
</author>
<published>2025-04-05T21:18:35Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=1ac6ea8a0251243d34f0ede2315b8f2b4393080d'/>
<id>urn:sha1:1ac6ea8a0251243d34f0ede2315b8f2b4393080d</id>
<content type='text'>
Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D49548
</content>
</entry>
<entry>
<title>Remove residual blank line at start of Makefile</title>
<updated>2024-07-15T22:43:39Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2024-07-15T04:46:32Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e9ac41698b2f322d55ccf9da50a3596edb2c1800'/>
<id>urn:sha1:e9ac41698b2f322d55ccf9da50a3596edb2c1800</id>
<content type='text'>
This is a residual of the $FreeBSD$ removal.

MFC After: 3 days (though I'll just run the command on the branches)
Sponsored by: Netflix
</content>
</entry>
<entry>
<title>kerberos5: Mitigate the possibility of using an old libcrypto</title>
<updated>2024-01-18T15:12:14Z</updated>
<author>
<name>Cy Schubert</name>
<email>cy@FreeBSD.org</email>
</author>
<published>2024-01-18T08:22:20Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=0990136ed1753ac7837206f9c5f4b83ccff6c405'/>
<id>urn:sha1:0990136ed1753ac7837206f9c5f4b83ccff6c405</id>
<content type='text'>
By using the full library name (libcrypto.so.30) we avoid the exposure
of using an old, possibly vulnerable, library.

Reported by: 		jrtc27
MFC after:		3 days
X-MFC with:		476d63e091c2
Fixes:			476d63e091c2
</content>
</entry>
<entry>
<title>kerberos: Fix numerous segfaults when using weak crypto</title>
<updated>2024-01-18T07:46:57Z</updated>
<author>
<name>Cy Schubert</name>
<email>cy@FreeBSD.org</email>
</author>
<published>2023-12-06T15:30:05Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=476d63e091c2e663b51d18acf6acb282e1f22bbc'/>
<id>urn:sha1:476d63e091c2e663b51d18acf6acb282e1f22bbc</id>
<content type='text'>
Weak crypto is provided by the openssl legacy provider which is
not load by default. Load the legacy providers as needed.

When the legacy provider is loaded into the default context the default
provider will no longer be automatically loaded. Without the default
provider the various kerberos applicaions and functions will abort().

This is the second attempt at this patch. Instead of linking
secure/lib/libcrypto at build time we now link it at runtime, avoiding
buildworld failures under Linux and MacOS. This is because
TARGET_ENDIANNESS is undefined at pre-build time.

PR:		272835
MFC after:	3 days
X-MFC:		only to stable/14
Tested by:	netchild
		Joerg Pulz &lt;Joerg.Pulz@frm2.tum.de&gt; (previous version)
</content>
</entry>
<entry>
<title>Revert "kerberos: Fix numerous segfaults when using weak crypto"</title>
<updated>2024-01-12T07:42:33Z</updated>
<author>
<name>Cy Schubert</name>
<email>cy@FreeBSD.org</email>
</author>
<published>2024-01-12T07:39:02Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3091cdb11fb05e554a54710116be87ee1f55c287'/>
<id>urn:sha1:3091cdb11fb05e554a54710116be87ee1f55c287</id>
<content type='text'>
This revision breaks Linux and MacOS cross builds because
TARGET_ENDIANNESS is not define during bootstrapping on these
platforms.

I think the correct approach would be to separate the new
fbsd_ossl_provider_load() and unload functions into their own
library (instead of libroken). This avoids the less desirable
option of including bsd.cpu.mk in secure/lib/Makefile.common,
which does build but could complicate future work.

Reported by:	jrtc27

This reverts commit cb350ba7bf7ca7c4cb97ed2c20ab45af60382cfb.
</content>
</entry>
</feed>
