Cannot bind an AF_UNIX socket with large filenames

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

 



It looks like the kernel -- at least 2.6.27.5 -- rejects with EINVAL a bind() of an AF_UNIX socket whose given size exceeds sizeof(struct sockaddr_un).

Even if I make arrangements for a larger structure to accomodate a path that exceeds sockaddr_un's 107 bytes + \0, and I specify the actual size of the structure, bind() fails for me.

I don't have the details, but I'm pretty sure other unixes accept domain sockets with larger filenames. There, the sockaddr_un structure exists for historical reasons, and you can pretty much roll your own.

This is perhaps worth mentioning in the description of EINVAL in unix(7).

Attachment: pgptjjfmZpmxZ.pgp
Description: PGP signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux