unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Liliana Marie Prikler <liliana.prikler@gmail.com>
Cc: 53928-done@debbugs.gnu.org
Subject: bug#53928: [PATCH] Allow null bytes in UNIX sockets.
Date: Thu, 16 Jun 2022 10:09:13 +0200	[thread overview]
Message-ID: <87r13pni6u.fsf@gnu.org> (raw)
In-Reply-To: <ba1d98d7aa643e09c5023c10117b2c461b4f9634.camel@gmail.com> (Liliana Marie Prikler's message of "Thu, 10 Feb 2022 21:42:31 +0100")

Hi,

Liliana Marie Prikler <liliana.prikler@gmail.com> skribis:

> The current socket address constructors all assume, that there are no
> null bytes in the socket path.  This assumption does not hold in Linux,
> which uses an initial null byte to demarcate abstract sockets and
> ignores all further null bytes [1].
>
> [1] https://www.man7.org/linux/man-pages/man7/unix.7.html
>
> * libguile/sockets.c (scm_fill_sockaddr)[HAVE_UNIX_DOMAIN_SOCKETS]:
> Use scm_to_locale_stringn to construct c_address.
> Use memcpy instead of strcpy and calculate size directly instead of
> using SUN_LEN.
> (_scm_from_sockaddr): Copy the entire path up to the limits imposed by
> addr_size.
> * test-suite/tests/00-socket.test: ("make-socket-address"): Add case for
> abstract unix sockets.
> ("AF_UNIX/SOCK_STREAM"): Add abstract socket versions of bind, listen,
> connect and accept.

Finally applied, thanks!

Ludo’.





      reply	other threads:[~2022-06-16  8:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-10 20:42 bug#53928: [PATCH] Allow null bytes in UNIX sockets Liliana Marie Prikler
2022-06-16  8:09 ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r13pni6u.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=53928-done@debbugs.gnu.org \
    --cc=liliana.prikler@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).