Age | Commit message (Collapse) | Author | |
---|---|---|---|
2011-12-16 | [PATCH] Abstract address UNIX sockets not binding properly (by ↵ | Jo-Philipp Wich | |
capnbry@gmail.com, #366) In #274, I stated abstract namespace and autobound abstract namespace datagram UNIX domain sockets work perfectly with nixio. However, I may have jumped the gun on that conclusion. Turns out they work perfectly for only one concurrent connection. The problem is that when binding to an abstract address socket, which begins with a NULL byte, nixio strncpy's the name into the sockaddr_un structure, which effectively copies nothing. It then binds to an address of 180 NULLs, which is completely legal, but obviously you run into problems when a second client tries to bind to the same address. The rules are as follows ( http://linux.die.net/man/7/unix) for the names: * If the name is blank, bind() should pass that the addrlen of sizeof(sa_family_t) and Linux will autobind a name that begins with null and is followed by 5 digits. * If the first character of the name is non-null, the name is a pathname and is null-terminated. addrlen should be sizeof(sockaddr_un), but the length can also be the pathname len + sizeof(sa_family_t) as the value will be null-terminated by the kernel unix socket driver * If the first character is null, the address is abstract and the value should not be null-terminated and addrlen is pathname + sizeof(sa_family_t) The attached patch fixes bind/connect/sendto by shortening the addrlen passed to be pathname len + sizeof(sa_family_t), which generates the correct socket names for all 3 cases above. It also fixes the address returned by recvfrom, which currently returns a blank string for any abstract address socket (as they begin with a null). | |||
2011-08-12 | libs/nixio: add missing file in previous commit, revert unrelated change | Jo-Philipp Wich | |
2011-08-12 | libs/nixio: implement getproto(), getprotobyname() and getprotobynumber() | Jo-Philipp Wich | |
2011-08-11 | libs/nixio: allow building without shadow password support | Jo-Philipp Wich | |
2011-08-11 | libs/nixio: fix possible issue with nonblocking bind() | Jo-Philipp Wich | |
2011-07-17 | libs/nixio: Fix recvfrom() return values for unnamed unix sockets, patch by ↵ | Jo-Philipp Wich | |
capnbry@gmail.com (#274) | |||
2011-01-13 | libs/nixio: fix sendto(), implement support for unix domain sockets (#140) | Jo-Philipp Wich | |
2010-06-10 | nixio: Add set_verify_locations for TLS | Steven Barth | |
2010-05-23 | nixio: Add nixio.gettimeofday() per user request | Steven Barth | |
2010-03-28 | nixio: Fix interface data for layer 3+ interfaces | Steven Barth | |
2010-03-27 | libs/nixio: make TLS support optional | Jo-Philipp Wich | |
2009-12-29 | libs/nixio: fix uninitialized variable warning on Darwin in splice.c | Jo-Philipp Wich | |
2009-12-28 | libs/nixio: properly cast len argument for OS X sendfile() | Jo-Philipp Wich | |
2009-12-28 | libs/nixio: fix compile on OS X | Jo-Philipp Wich | |
2009-11-28 | nixio: Improve number handling with non-double Lua setups | Steven Barth | |
2009-11-01 | nixio: Device stats are unsinged from kernel and likely to overflow so use ↵ | Steven Barth | |
pushnumber instead of pushinteger. | |||
2009-10-31 | System loads are floats | Steven Barth | |
2009-10-26 | Build fixes | Steven Barth | |
2009-10-26 | nixio: store stats and other number information as integer, which works ↵ | Felix Fietkau | |
better when lua number support is downgraded from double to float | |||
2009-08-27 | libs/nixio: protect splice calls with ifdef SPLICE_F_MOVE, fixes compile ↵ | Jo-Philipp Wich | |
error with openwrt trunk x86/glibc | |||
2009-07-29 | Kill abandoned files | Steven Barth | |
2009-07-19 | libs/nixio: don't close stdin, stdout or stderr during garbage collection | Jo-Philipp Wich | |
2009-07-14 | nixio: | Steven Barth | |
Add Rockspec Add bswap to nixio.bit Fix nixio.bit documentation | |||
2009-07-11 | Fix getifaddrs() for BSD | Steven Barth | |
2009-07-11 | nixio: Fix accidental closing of file descriptors after dup with two | Steven Barth | |
parameters resulting in strange behaviour when spawning processes | |||
2009-06-21 | nixio: Resolve namespace clashes | Steven Barth | |
2009-06-15 | Redefine splice() flags for crappy uclibc versions | Steven Barth | |
2009-06-07 | nixio: Add support for DER certificates, PX5G fix Certmaster | Steven Barth | |
2009-06-06 | nixio: Add support for DER keyfiles | Steven Barth | |
2009-06-06 | nixio: Use correct datatypes for base64 encode | Steven Barth | |
2009-05-28 | nixio: Rework TLS support, added support for CyaSSL | Steven Barth | |
2009-05-28 | Würg around some nasty axTLS keying bugs | Steven Barth | |
2009-04-26 | nixio: | Steven Barth | |
Added binding for getifaddrs(): List network interfaces, their flags, addresses and statistics Cleanups | |||
2009-04-21 | Merge nixio 0.2 | Steven Barth | |
2009-03-16 | nixio: solaris does not recognize LOG_PERROR | Steven Barth | |
2009-03-16 | Fix a possible stack corruption | Steven Barth | |
2009-03-16 | Added missing file | Steven Barth | |
2009-03-16 | nixio: added syslog support | Steven Barth | |
2009-03-13 | Sync nixio | Steven Barth | |
2009-03-13 | nixio: More sockopts | Steven Barth | |
2009-03-13 | nixio: +socket options SO_DONTROUTE, SO_BINDTODEVICE | Steven Barth | |
2009-03-12 | nixio: chdir() | Steven Barth | |
2009-03-12 | nixio: add setsid() | Steven Barth | |
2009-03-12 | FreeBSD compatibility #3 | Steven Barth | |
2009-03-12 | nixio: FreeBSD compatibility #2 | Steven Barth | |
2009-03-12 | nixio: FreeBSD compatibility #1 | Steven Barth | |
2009-03-10 | Be nice() | Steven Barth | |
2009-03-09 | nixio: Implement protable behaviour of signal(), export more error | Steven Barth | |
constants | |||
2009-03-09 | httpclient: Added missing import | Steven Barth | |
nixio: waitpid() returns 0 with WNOHANG and no terminated childs | |||
2009-03-09 | nixio: reenable splice() for linux | Steven Barth | |