git: 431cc94c0395 - main - user_connectat: correctly pass fd through
Date: Wed, 11 Nov 2026 14:57:46 UTC
The branch main has been updated by brooks:
URL: https://cgit.FreeBSD.org/src/commit/?id=431cc94c0395205f7859d5f65289f9f2ebbe8162
commit 431cc94c0395205f7859d5f65289f9f2ebbe8162
Author: Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2026-11-11 14:41:40 +0000
Commit: Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2026-11-11 14:57:13 +0000
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
---
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 8d8a777018e8..b40624200837 100644
--- a/sys/kern/uipc_syscalls.c
+++ b/sys/kern/uipc_syscalls.c
@@ -476,7 +476,7 @@ user_connectat(struct thread *td, int fd, int s, const struct sockaddr *name,
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);