[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#338290: Can't start X twice on GNU/kFreeBSD



El miércoles, 9 de noviembre de 2005 09:25, Petr Salinger escribió:
[...]
> this bug started as
> 
http://lists.alioth.debian.org/pipermail/glibc-bsd-devel/2005-November/000628.html
>
> On debian/kFreeBSD is not defined HasBSD44Sockets.
> It shouldn't be problem because FreeBSD kernel 5.4 and 6.0
> tries to be compatible with older (BSD43) source code
> and at least in connect(), bind() ignores value in the field sun_len.
> It uses only the value addrlen from function in system call.
>
> Unfortunately, we are hitted by computing the whole name length as
> namelen = strlen(sockname.sun_path) + sizeof(sockname.sun_family);
> instead of portable
> namelen = strlen(sockname.sun_path) + offsetof(struct sockaddr_un,
> sun_path);
[..]
> Submitted also upstream in
> https://bugs.freedesktop.org/show_bug.cgi?id=4982

	Hello, Petr. Have you seen the annotation that Aurelien did on Jan 2nd in the 
upstream bug report?:

==========
Actually according to POSIX1.2004, you don't even't need to use strlen and 
offsetof, you can use sizeof(struct sockaddr_un) instead. Tested with a 
FreeBSD kernel and a Linux kernel. 
  
POSIX1.2004, page 263 says:    
"address_len   Specifies the length of the sockaddr structure pointed to by    
the address argument."    
==========

	Anyway, I am applying your patch, as it is correct for you, until you have 
some time to review the changes Aurelien proposes.

	Best regards,


		Ender.
-- 
Network engineer
Debian Developer

Attachment: pgpFsE1nxJ3ea.pgp
Description: PGP signature


Reply to: