]> git.ipfire.org Git - thirdparty/krb5.git/commit
Fix minor logic errors 1473/head
authorGreg Hudson <ghudson@mit.edu>
Fri, 19 Dec 2025 07:56:55 +0000 (02:56 -0500)
committerGreg Hudson <ghudson@mit.edu>
Tue, 20 Jan 2026 22:08:50 +0000 (17:08 -0500)
commit5f4e17c8e2c31201628ab260f0991e8e47c8f1d2
tree6c1ef45dd0dc10db65b7869d1bbe1fec43aa2ab8
parentdc0fb445d8236ed2d5121f6d9876f91a69c25605
Fix minor logic errors

In k5_externalize_auth_context(), serialize the correct field when
local_port is set.  This is not a reachable bug because the function
is only accessible via gss_export_sec_context(), and the GSS library
does not set a local port.  Commit
e50f46b210ddafe85cc917e2571516ade46bc65f fixed a similar bug for
remote_port.

In krb5_pac_get_types(), correct the allocation of *types_out.  (The
previous code was safe in spite of its incorrectness, because the size
of a pointer is at least as big as the size of uint32_t.)

Change make_spnego_tokenTarg_msg() to return 0 on success and -1 on
failure, to match make_spnego_tokenInit_msg() and the expectations of
its call sites.  Commit fdceb225f881e2b1337eebcb9a9443fa4a9be3fd is
partly to blame as it changed the return type from int to OM_uint32,
but prior to that the function still returned GSS major codes rather
than -1 on error.

ticket: 9192
src/lib/gssapi/spnego/spnego_mech.c
src/lib/krb5/krb/pac.c
src/lib/krb5/krb/ser_actx.c