cockpit-tls: don't warn on EACCES when connecting to ws socket

systemd can racily set up the instance socket. There is a window
during which connecting to the socket fails with EACCES.
Like ENOENT and ECONNREFUSED, this is transient and resolved
by retrying, so don't warn about it.
This commit is contained in:
tomasmatus 2026-09-18 12:13:20 +02:00 committed by Allison Karlitskaya
parent 0f8fc00f3b
commit ac6d0f36c8

View file

@ -426,7 +426,8 @@ connection_connect_to_dynamic_wsinstance (Connection *self)
if (af_unix_connectat (self->ws_fd, parameters.wsinstance_sockdir, sockname) == 0)
return true;
if (errno != ENOENT && errno != ECONNREFUSED)
/* EACCES: systemd does not atomically set the socket's permissions before we try to connect to it */
if (errno != ENOENT && errno != ECONNREFUSED && errno != EACCES)
warn ("connect(%s) failed on the first attempt", sockname);
debug (CONNECTION, " -> failed (%m). Requesting activation.");