FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 07-03-2008, 10:29 AM
Florian Weimer
 
Default buildd path name length

Suppose that a package wants to create a UNIX domain socket as part of
its test suite. If the socket is created within the package build
directory, this might fail because of the quite low path name length
limit. What is the correct way of dealing with this? "mktemp -d" uses
TMPDIR, which is potentially affected by the same issue.

(My personal opinion is "fix the buildd", especially since none of the
official buildds seems to use long path names, but there is
disagreement.)


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-03-2008, 11:23 AM
Simon Josefsson
 
Default buildd path name length

Florian Weimer <fw@deneb.enyo.de> writes:

> Suppose that a package wants to create a UNIX domain socket as part of
> its test suite. If the socket is created within the package build
> directory, this might fail because of the quite low path name length
> limit. What is the correct way of dealing with this? "mktemp -d" uses
> TMPDIR, which is potentially affected by the same issue.
>
> (My personal opinion is "fix the buildd", especially since none of the
> official buildds seems to use long path names, but there is
> disagreement.)

Can't the low path name length limit be fixed? What restricts the
length? Kernel, libc, filesystem, ...?

/Simon


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-03-2008, 11:52 AM
Florian Weimer
 
Default buildd path name length

* Simon Josefsson:

>> Suppose that a package wants to create a UNIX domain socket as part of
>> its test suite. If the socket is created within the package build
>> directory, this might fail because of the quite low path name length
>> limit. What is the correct way of dealing with this? "mktemp -d" uses
>> TMPDIR, which is potentially affected by the same issue.
>>
>> (My personal opinion is "fix the buildd", especially since none of the
>> official buildds seems to use long path names, but there is
>> disagreement.)
>
> Can't the low path name length limit be fixed? What restricts the
> length? Kernel, libc, filesystem, ...?

It's part of the API:

/* Structure describing the address of an AF_LOCAL (aka AF_UNIX)
socket. */
struct sockaddr_un
{
__SOCKADDR_COMMON (sun_);
char sun_path[108]; /* Path name. */
};


I haven't checked if the Linux kernel actually cares about the actually
length of this data structure (there are explicit length fields in all
cases), but I guess it should work. However, this might not be portable
to the Hurd or kfreebsd.

In a larger context, there is sockaddr_storage, which indirectly imposes
a limit (because getpeername must complete when passed a
sockaddr_storage argument, for instance). Overlong UNIX domain sockets
might break some libraries that rely on that functionality.


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 07:17 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org