[PATCH] hurd: SCM_CREDS support
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Sat, 17 May 2025 15:15:43 +0000 (17:15 +0200)
committerAurelien Jarno <aurel32@debian.org>
Sat, 17 May 2025 15:15:43 +0000 (17:15 +0200)
commit3e96720a09987d023ddb71e7cc7b443690a10d02
tree9dbe7e331a8e01efd26a33a9d6c6cbe35de9fdb9
parent649124d92c084e9c1e12f0b6632aee18f8f5f059
[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.

FIXME: this doesn't actually check uid/gid.

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