socket: remove unused chmod() call

Drop the SCK_FLAG_ALL_PERMISSIONS support from the socket code.
chronyc is now calling chmod() on its socket itself in a hidden
directory to mitigate the unsafe operation.
This commit is contained in:
Miroslav Lichvar
2025-07-16 16:19:18 +02:00
parent 90d808ed28
commit 54010586aa
2 changed files with 1 additions and 8 deletions

View File

@@ -641,12 +641,6 @@ bind_unix_address(int sock_fd, const char *addr, int flags)
return 0;
}
/* Allow access to everyone with access to the directory if requested */
if (flags & SCK_FLAG_ALL_PERMISSIONS && chmod(addr, 0666) < 0) {
DEBUG_LOG("Could not change permissions of %s : %s", addr, strerror(errno));
return 0;
}
return 1;
}