[PATCH] hurd: SCM_CREDS support
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Thu, 22 Sep 2022 20:02:00 +0000 (21:02 +0100)
committerAurelien Jarno <aurel32@debian.org>
Thu, 22 Sep 2022 20:02:00 +0000 (21:02 +0100)
commit0e8e295aa5d64fb43d110d0ee7e4ba0be742208d
tree914b67c0759716ed9d729e67ef6f6c3eeff678d6
parent7cc72deb4ebc4a80c522452c1cec591cbdba7a62
[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