Implement socket file redirection.
* configure.ac (AC_CHECK_FUNC): Check for stat. * src/assuan-socket.c (SUN_LEN): Add. (eval_redirection): New. (_assuan_sock_connect) [!W32]: Implement socket file redirection. (_assuan_sock_set_sockaddr_un): New. (assuan_sock_set_sockaddr_un): New.
This feature is useful to allow sockets with standard names even on
file system which do not supports socket and to help with shared home
directories. For example to use GnuPG 2.1 with shared home
directories one will be abale to do:
rm ~/.gnupg/S.gpg-agent || true
printf "%%Assuan%%\nsocket=${HOME}/.gnupg/S.gpg-agent_${HOSTNAME}\n" \
> ~/.gnupg/S.gpg-agent
- Signed-off-by: Werner Koch <wk@gnupg.org>