From 4aa926fbca4c872b98f33704cc1c2edf1585205a Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Wed, 11 Nov 2026 14:41:40 +0000 Subject: [PATCH] user_connectat: correctly pass fd through In the original adaptation of connect/connectat to use user_connectat in CheriBSD, I failed to pass the fd through in the connectat case and always passed AT_FDCWD. This did trigger failures in the unix_connectat test which I somehow missed in prior test runs. Reported by: llm-postcr (cherry picked from commit 431cc94c0395205f7859d5f65289f9f2ebbe8162) --- sys/kern/uipc_syscalls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index 670167a43e6c..ec4fed463f16 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -482,7 +482,7 @@ user_connectat(struct thread *td, int fd, int s, error = getsockaddr(&sa, name, namelen); if (error == 0) { - error = kern_connectat(td, AT_FDCWD, s, sa); + error = kern_connectat(td, fd, s, sa); free(sa, M_SONAME); } return (error);