If you run "rdm --socket-file=/long/path/to/rdm_socket_file ... " the server will most likely start and use an incorrect (truncated socket file). I believe the fix is to update SocketClient.cpp and SocketServer.cpp to have something like
if (path.length >=sizeof(addr_un.sun_path)) {error("socket file path too long, must be less than %d",sizeof(addr_un.sun_path);} before:
strncpy(addr_un.sun_path, path.constData(), sizeof(addr_un.sun_path));
and change strncpy to a strcpy as it will be safe.
(I haven't looked through your code enough to see how to report such an error). See man 7 unix for details on the socket file limit.
Specifying a socket file that is incorrect (too long) should result in an error.
Actual behavior
rdm may or may not start. It depends upon where the long socket file was truncated. If it does start, it will start incorrectly and use a different named socket file from what was specified.
Please mark appropriate
Problem description
If you run "rdm --socket-file=/long/path/to/rdm_socket_file ... " the server will most likely start and use an incorrect (truncated socket file). I believe the fix is to update SocketClient.cpp and SocketServer.cpp to have something like
(I haven't looked through your code enough to see how to report such an error). See man 7 unix for details on the socket file limit.
I believe the sizeof(addr_un.sum_path) results in 108 on Linux and 104 on Mac and is not adjustable. See https://serverfault.com/questions/641347/check-if-a-path-exceeds-maximum-for-unix-domain-socket https://unix.stackexchange.com/questions/367008/why-is-socket-path-length-limited-to-a-hundred-chars https://stackoverflow.com/questions/34829600/why-is-the-maximal-path-length-allowed-for-unix-sockets-on-linux-108
Expected behavior
Specifying a socket file that is incorrect (too long) should result in an error.
Actual behavior
rdm may or may not start. It depends upon where the long socket file was truncated. If it does start, it will start incorrectly and use a different named socket file from what was specified.
Environment
Debian 8
4.0.1
Feature request
Describe the feature we should add to RTags.