From 0882e3951d910b923f3463fa98604df9fcb13a0c Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 15 Jun 2026 14:03:07 +0200 Subject: [PATCH] servers: mask to `S_IFMT` in unix socket path attribute check Instead of `S_IFSOCK` before this patch. For correctness; it is probably not an issue in most environments. Spotted by Copilot Bug: https://github.com/curl/curl/pull/22021#discussion_r3413049506 Follow-up to 99fb36797a3f0b64ad20fcb8b83026875640f8e0 Closes #22026 --- tests/server/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/server/util.c b/tests/server/util.c index d6141aaf21..9fc7952f84 100644 --- a/tests/server/util.c +++ b/tests/server/util.c @@ -701,7 +701,7 @@ int bind_unix_socket(curl_socket_t sock, const char *unix_socket, errno, curlx_strerror(errno, errbuf, sizeof(errbuf))); return -1; } - if((statbuf.st_mode & S_IFSOCK) != S_IFSOCK) { + if((statbuf.st_mode & S_IFMT) != S_IFSOCK) { logmsg("Error binding socket, %s is not a socket", unix_socket); return -1; }