diff options
author | Alejandro Colomar <alx.manpages@gmail.com> | 2022-08-07 01:08:52 +0200 |
---|---|---|
committer | Alejandro Colomar <alx.manpages@gmail.com> | 2022-08-18 18:56:24 +0200 |
commit | e2aec6686a4d2cf1ddc017b50dbb39baefd2d425 (patch) | |
tree | 54829c0a1f41c2cd6d34cd92b21df3046bae1f01 /docs | |
parent | d8e0768a5bae991b96328f469b8e27d8a51da9d6 (diff) | |
download | unit-e2aec6686a4d2cf1ddc017b50dbb39baefd2d425.tar.gz unit-e2aec6686a4d2cf1ddc017b50dbb39baefd2d425.tar.bz2 |
Storing abstract sockets with @ internally.
We accept both "\u0000socket-name" and "@socket-name" as abstract
unix sockets. The first one is passed to the kernel pristine,
while the second is transformed '@'->'\0'.
The commit that added support for unix sockets accepts both
variants, but we internally stored it in the same way, using
"\u0000..." for both.
We want to support abstract sockets transparently to the user, so
that if the user configures unitd with '@', if we receive a query
about the current configuration, the user should see the same
exact thing that was configured. So, this commit avoids the
transformation in the internal state file, storing user input
pristine, and we only transform the '@' for a string that will
be used internally (not user-visible).
This commit (indirectly) fixes a small bug, where we created
abstract sockets with a trailing '\0' in their name due to calling
twice nxt_sockaddr_parse() on the same string. By calling that
function only once with each copy of the string, we have fixed that
bug.
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions