freebsd-src/krb5/usr.bin
Cy Schubert b0e7b55a0e krb5: Enable PRINC_LOOK_AHEAD in ksu
PRINC_LOOK_AHEAD is the upstream default. Normally ksu determines the
target princiapl by (quoted from the man page)

a. default principal of the source cache

b. target_user@local_realm

c. source_user@local_realm

With PRINC_LOOK_AHEAD emabled, for each candidate in the above
list, select an authorized principal that has the same realm name
and first part of the principal name equal to the prefix of the
candidate. For example if candidate a) is jqpublic@ISI.EDU and
jqpublic/secure@ISI.EDU is authorized to access the target account
then the default principal is set to jqpublic/secure@ISI.EDU.

Case 2: source user is root.

If the target user is non-root then the default principal name
is target_user@local_realm.  Else, if the source cache exists
the default principal name is set to the default principal of
the source cache.  If the source cache does not exist, default
principal name is set to root\@local_realm.

This commit restores the same behaviour as Heimdal ksu.

Reported by:		Dan Mahoney <dmahoney@isc.org>
Requested by:		Dan Mahoney <dmahoney@isc.org>
MFC after:		3 days
MFC to:			15/stable
Differential revision:	 https://reviews.freebsd.org/D52478
2025-09-12 07:32:48 -07:00
..
gss-client krb5: Fix typo "SPDX-License-Idendifier" 2025-08-17 22:17:06 +01:00
kadmin krb5: Fix typo "SPDX-License-Idendifier" 2025-08-17 22:17:06 +01:00
kdestroy krb5: Fix typo "SPDX-License-Idendifier" 2025-08-17 22:17:06 +01:00
kinit krb5: Fix typo "SPDX-License-Idendifier" 2025-08-17 22:17:06 +01:00
klist krb5: Fix typo "SPDX-License-Idendifier" 2025-08-17 22:17:06 +01:00
kpasswd krb5: Fix typo "SPDX-License-Idendifier" 2025-08-17 22:17:06 +01:00
ksu krb5: Enable PRINC_LOOK_AHEAD in ksu 2025-09-12 07:32:48 -07:00
kswitch krb5: Fix typo "SPDX-License-Idendifier" 2025-08-17 22:17:06 +01:00
ktutil krb5: Fix typo "SPDX-License-Idendifier" 2025-08-17 22:17:06 +01:00
kvno krb5: Fix typo "SPDX-License-Idendifier" 2025-08-17 22:17:06 +01:00
sclient krb5: Fix typo "SPDX-License-Idendifier" 2025-08-17 22:17:06 +01:00
sim_client krb5: Fix typo "SPDX-License-Idendifier" 2025-08-17 22:17:06 +01:00
Makefile krb5: Fix typo "SPDX-License-Idendifier" 2025-08-17 22:17:06 +01:00
Makefile.inc packages: Improve handling of -lib packages 2025-08-23 01:57:23 +01:00