GNU bug report logs - #23068
25.1.50; unix socket address in abstract namespace

Previous Next

Package: emacs;

Reported by: Mark Oteiza <mvoteiza <at> udel.edu>

Date: Sun, 20 Mar 2016 03:19:01 UTC

Severity: wishlist

Found in version 25.1.50

Full log


View this message in rfc822 format

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: Mark Oteiza <mvoteiza <at> udel.edu>, 23068 <at> debbugs.gnu.org
Subject: bug#23068: 25.1.50; unix socket address in abstract namespace
Date: Sun, 20 Mar 2016 18:39:02 +0100
Lars Magne Ingebrigtsen <larsi <at> gnus.org> writes:

> Mark Oteiza <mvoteiza <at> udel.edu> writes:
>
>> and I'm able to connect to it otherwise. The above elisp does:
>>
>>   socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC, 0) = 8
>>   connect(8, {sa_family=AF_LOCAL, sun_path=@""}, 110) = -1
>> ECONNREFUSED (Connection refused)
>>   close(8) 
>
> Yeah, this code in conv_lisp_to_sockaddr doesn't look very correct:
>
>   else if (STRINGP (address))
>     {
> #ifdef HAVE_LOCAL_SOCKETS
>       if (family == AF_LOCAL)
> 	{
> 	  struct sockaddr_un *sockun = (struct sockaddr_un *) sa;
> 	  cp = SDATA (address);
> 	  for (i = 0; i < sizeof (sockun->sun_path) && *cp; i++)
> 	    sockun->sun_path[i] = *cp++;

This also needs to encode the string in one way.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




This bug report was last modified 3 years and 232 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.