[PATCH] hurd: SCM_CREDS support
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Tue, 23 Jan 2024 20:57:06 +0000 (21:57 +0100)
committerAurelien Jarno <aurel32@debian.org>
Tue, 23 Jan 2024 20:57:06 +0000 (21:57 +0100)
commite35a8a187b07a81d3140fb36cc1dffb3803e638a
tree279d007be72703ba5b44e39cfc8659ca512bf6cb
parentfc64071c721f528454c15b3990c5d072b6f626b9
[PATCH] hurd: SCM_CREDS support

Svante Signell  <svante.signell@gmail.com>
Samuel Thibault  <samuel.thibault@ens-lyon.org>

* sysdeps/mach/hurd/sendmsg.c (__libc_sendmsg): On SCM_CREDS
control messages, record uids, pass a rendez-vous port in the
control message, and call __auth_user_authenticate_request to
make auth send credentials on that port.  Do not wait for a
reply.
* sysdeps/mach/hurd/recvmsg.c (contains_uid, contains_gid,
check_auth): New functions.
(__libc_recvmsg): On SCM_CREDS control messages, call check_auth
to check the passed credentials thanks to the answer from the
auth server.
* hurd/Makefile (user-interfaces): Add auth_request and
auth_reply.

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name tg-sendmsg-SCM_CREDS.diff
hurd/Makefile
sysdeps/mach/hurd/recvmsg.c
sysdeps/mach/hurd/sendmsg.c