The length of the socket path passed to osquery-go should not exceed 97 characters because a "." and a uuid of up to 5 characters is added to the provided socket path. If the total socket path exceeds 103 characters, this will error. Why can a socket not be greater than 103 characters?
I have read that some systems allow 108, I tested this on on m1 macOS monterey 12.4 and when the total socket path (uuid included) was greater than 103, I got an error.
This PR adds an error condition to ensure given path does not exceed 97 characters and an associated unit test.
The length of the socket path passed to osquery-go should not exceed 97 characters because a "." and a uuid of up to 5 characters is added to the provided socket path. If the total socket path exceeds 103 characters, this will error. Why can a socket not be greater than 103 characters?
https://unix.stackexchange.com/questions/367008/why-is-socket-path-length-limited-to-a-hundred-chars
I have read that some systems allow 108, I tested this on on m1 macOS monterey 12.4 and when the total socket path (uuid included) was greater than 103, I got an error.
This PR adds an error condition to ensure given path does not exceed 97 characters and an associated unit test.