Menu

Commit [2f963d]  Maximize  Restore  History

uds: Don't call chmod() on client socket.

The pmc clients should not need to modify the permissions of their
socket (following the uds_file_mode setting), they can rely on their
umask.

Make the chmod() call on the bound socket only in the server.

This removes a race condition between the bind() and chmod() calls that
could potentially be exploited by ptp4l running under a non-root user.
It could replace the socket with a symlink in order to make the client
running under root to change the mode of a different file.

Signed-off-by: Miroslav Lichvar <mlichvar@...>
Reviewed-by: Jacob Keller <jacob.e.keller@...>

Miroslav Lichvar (via linuxptp-devel Mailing List) Miroslav Lichvar (via linuxptp-devel Mailing List) 2025-07-31

Richard Cochran Richard Cochran 2025-09-04

changed uds.c
uds.c Diff Switch to side-by-side view
Loading...