]> git.ipfire.org Git - thirdparty/krb5.git/commit
Add underpinnings of UNIX domain socket support
authorAndreas Schneider <asn@samba.org>
Tue, 9 Jul 2024 09:32:34 +0000 (11:32 +0200)
committerGreg Hudson <ghudson@mit.edu>
Wed, 11 Dec 2024 20:45:51 +0000 (15:45 -0500)
commita575589ef525fb139cafa0de1a05382845f0afbd
treefac3a845ba1ebebc320e6c1f14c87d8b895abff7
parentc67b17a17985db291931babb31bece9bd287fbb5
Add underpinnings of UNIX domain socket support

Add sa2sun() and ss2sun() helpers to socket-utils.h.  Add UNIX domain
socket support to sa_socklen() and print_addr().  Expand buffers for
printing addresses to 128 bytes to accomodate the maximum UNIX domain
socket path length.

Add loop_add_unix_socket() to net-server.c, primarily using the
existing TCP support (renamed to "stream").

As there is no standard Kerberos address type for UNIX domain sockets,
add basic directional address support.  Add a definition for
ADDRTYPE_DIRECTIONAL in krb5.h.  Add private constant krb5_address
objects to libkrb5 for initiator and acceptor directional addresses.
Use directional addresses for the KRB-SAFE/KRB-PRIV source address in
the kprop and password change protocols when the transport is not IPv4
or IPv6.

krb5_address objects are used for auditing purposes in the KDC audit
and KDB pluggable interfaces.  Add a local-use address type
ADDRTYPE_UNIXSOCK for use in these cases.  Add a flag to
k5_sockaddr_to_address() to indicate whether this address type can be
used.  Add UNIX domains socket conversion support to the test audit
plugin module.

[ghudson@mit.edu: combined several commits; used directional addresses
for KRB-SAFE/KRB-PRIV; reduced duplication in net-server.c support;
wrote commit message.  Also based on work by Alexander Bokovoy.]

ticket: 9155
19 files changed:
doc/appdev/refs/macros/index.rst
src/include/k5-int.h
src/include/krb5/krb5.hin
src/include/net-server.h
src/include/port-sockets.h
src/include/socket-utils.h
src/kadmin/server/schpw.c
src/kdc/dispatch.c
src/kdc/kdc_audit.c
src/kdc/kdc_log.c
src/kdc/kdc_util.c
src/kprop/kprop.c
src/kprop/kpropd.c
src/lib/apputils/net-server.c
src/lib/krb5/libkrb5.exports
src/lib/krb5/os/addr.c
src/lib/krb5/os/changepw.c
src/plugins/audit/j_dict.h
src/plugins/audit/kdc_j_encode.c