install: verify taskd socket path fits in sun_path
commitcb94ca5e49a4f45abbda63d4d2c569e1a7070fd9
authorKyle J. McKay <mackyle@gmail.com>
Mon, 30 Nov 2020 03:54:08 +0000 (29 20:54 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Mon, 30 Nov 2020 03:54:08 +0000 (29 20:54 -0700)
tree5ac93249e0ca2e04fe05d8450b1618d2e8d98770
parent03799b8360ff75ae96c3e38e523e0fe8f3150f36
install: verify taskd socket path fits in sun_path

The full path to the taskd socket must fit (including the
terminating '\0') within the sun_path field of the
struct sockaddr_un structure.

Unfortunately, it has a limited length that's much less
than the maximum path length or even the POSIX minimum
maximum path length.

Check during the installation process to make sure that
the full path to the taskd socket will fit in the sun_path
field otherwise complain loudly and abort the installation.

Make the actual length of the sun_path field available in
the `var_sun_path_len` variable.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
install.sh
shlib.sh
src/.gitignore
src/GNUmakefile
src/get_sun_path_len.c [new file with mode: 0644]