Commit graph

105 commits

Author SHA1 Message Date
Jo-Philipp Wich
431d4e8eff merge branch changes into trunk 2012-10-29 13:09:31 +00:00
Jo-Philipp Wich
ec5487649e [PATCH] nixio HAS_SHADOW test link error
The nixio library can mistakenly build without shadow password support due to the
compile-time test failing.

Because the test for HAS_SHADOW in the nixio Makefile uses the default CC flags,
the test may attempt to cross-compile with different VFP abi than libc does and
will therefore not link. Passing CCFLAGS on the command line builds the test
correctly and will enable HAS_SHADOW if available.
2012-08-29 13:04:44 +00:00
Jo-Philipp Wich
1916ab494a libs/nixio: add missing parameter to alarm reset 2012-08-27 14:54:37 +00:00
Jo-Philipp Wich
54567e57ea libs/nixio: cancel pending alarm after successfully returning from getnameinfo() 2012-08-27 14:54:07 +00:00
Jo-Philipp Wich
c755e818c4 libs/nixio: implement optional timeout for getnameinfo() on Linux 2012-08-27 14:36:47 +00:00
Jo-Philipp Wich
005fd26cf6 libs/nixio: reorder linker commandline args to fix build on Ubuntu 11.x 2012-03-13 22:45:26 +00:00
Jo-Philipp Wich
e620bdac3e libs/nixio: disable TLS implementation by default, fixes host builds on Ubuntu 11.x 2012-03-13 22:11:27 +00:00
Jo-Philipp Wich
ca7bc48ebc [PATCH] Abstract address UNIX sockets not binding properly (by 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-12-16 02:10:37 +00:00
Jo-Philipp Wich
3face70859 libs/nixio: link with libcrypto when using OpenSSL as digest backend 2011-11-20 18:18:46 +00:00
Jo-Philipp Wich
621fff61a3 libs/nixio: remove forgotten stamp file 2011-10-24 21:39:47 +00:00
Jo-Philipp Wich
69ba2e55a1 libs/nixio: add missing file in previous commit, revert unrelated change 2011-08-12 10:27:48 +00:00
Jo-Philipp Wich
2b33717dc4 libs/nixio: implement getproto(), getprotobyname() and getprotobynumber() 2011-08-12 10:26:33 +00:00
Jo-Philipp Wich
0d73b6d411 libs/nixio: allow building without shadow password support 2011-08-11 23:21:06 +00:00
Jo-Philipp Wich
11ff9204cf libs/nixio: fix possible issue with nonblocking bind() 2011-08-11 23:15:05 +00:00
Jo-Philipp Wich
518dc0fef9 libs/nixio: Fix recvfrom() return values for unnamed unix sockets, patch by capnbry@gmail.com (#274) 2011-07-17 09:04:43 +00:00
Jo-Philipp Wich
716fd7a2d1 libs/nixio: fix sendto(), implement support for unix domain sockets (#140) 2011-01-13 23:26:19 +00:00
Steven Barth
05a61e4632 nixio: Add set_verify_locations for TLS 2010-06-10 07:46:36 +00:00
Steven Barth
ad2ff61191 nixio: Add nixio.gettimeofday() per user request 2010-05-23 16:35:59 +00:00
Jo-Philipp Wich
74f118ab5c libs/nixio: save uhttpd certs as well 2010-04-05 17:38:05 +00:00
Steven Barth
53f812b11a nixio: Fix interface data for layer 3+ interfaces 2010-03-28 19:42:09 +00:00
Jo-Philipp Wich
c0d0953bd7 libs/nixio: make TLS support optional 2010-03-27 19:16:54 +00:00
Jo-Philipp Wich
859f99845e libs/nixio: fix uninitialized variable warning on Darwin in splice.c 2009-12-29 17:55:10 +00:00
Jo-Philipp Wich
6ea063dc11 libs/nixio: properly cast len argument for OS X sendfile() 2009-12-28 23:07:04 +00:00
Jo-Philipp Wich
6ffdb72a4d libs/nixio: fix compile on OS X 2009-12-28 22:03:42 +00:00
Steven Barth
87491bf031 nixio: Improve number handling with non-double Lua setups 2009-11-28 10:24:19 +00:00
Steven Barth
1bc570101b nixio: Device stats are unsinged from kernel and likely to overflow so use pushnumber instead of pushinteger. 2009-11-01 18:29:15 +00:00
Steven Barth
760b917114 System loads are floats 2009-10-31 16:30:44 +00:00
Steven Barth
6e7c32fa7d Build fixes 2009-10-26 13:24:36 +00:00
Felix Fietkau
64d9a00a99 nixio: store stats and other number information as integer, which works better when lua number support is downgraded from double to float 2009-10-26 04:52:07 +00:00
Jo-Philipp Wich
30f881974c libs/nixio: protect splice calls with ifdef SPLICE_F_MOVE, fixes compile error with openwrt trunk x86/glibc 2009-08-27 01:23:08 +00:00
Steven Barth
50cf0212ab Kill abandoned files 2009-07-29 07:48:11 +00:00
Steven Barth
7b5cdb36b5 Code style 2009-07-27 10:27:35 +00:00
Jo-Philipp Wich
2f7fb7e05c libs/nixio: d'oh ... import tostring() as well 2009-07-26 22:34:06 +00:00
Jo-Philipp Wich
136b7253b1 libs/nixio: convert data to string in writeall(), this is required for numeric and udata arguments 2009-07-26 22:32:13 +00:00
Jo-Philipp Wich
306b2d865a libs/nixio: don't close stdin, stdout or stderr during garbage collection 2009-07-19 02:39:10 +00:00
Jo-Philipp Wich
6abba61632 libs/nixio: allow calls to nixio.util.consume() with no iterator given 2009-07-18 21:58:41 +00:00
Jo-Philipp Wich
4bc6b85bb7 libs/nixio: add destination table argument to nixio.util.consume() 2009-07-18 21:55:14 +00:00
Steven Barth
dae7f3f4d5 nixio:
Add Rockspec
Add bswap to nixio.bit
Fix nixio.bit documentation
2009-07-14 15:21:00 +00:00
Steven Barth
8162842107 Fix getifaddrs() for BSD 2009-07-11 10:21:27 +00:00
Steven Barth
0864f5f88b nixio: Mark axTLS as discouraged, fix changelog 2009-07-11 08:06:47 +00:00
Steven Barth
72a0ee36b6 nixio: Update documentation to prepare 0.3 release 2009-07-11 07:54:57 +00:00
Steven Barth
21be73a478 nixio: Fix accidental closing of file descriptors after dup with two
parameters resulting in strange behaviour when spawning processes
2009-07-11 07:01:32 +00:00
Jo-Philipp Wich
58a5b15c0b libs/nixio: add sysupgrade hook to include /etc/nixio/ (generated certs) into saved file list 2009-06-30 18:05:07 +00:00
Steven Barth
a2c71bf739 nixio: Resolve namespace clashes 2009-06-21 13:41:18 +00:00
Jo-Philipp Wich
988eeb8ff1 libs/nixio: wrap $(CC) in quotes, command could break if ccache is used (CC:=ccache mips-openwrt-linux-uclibc-gcc) 2009-06-15 20:07:59 +00:00
Steven Barth
8546622f65 Redefine splice() flags for crappy uclibc versions 2009-06-15 19:11:38 +00:00
Steven Barth
690927bf6b Some sendfile() under Linux 2.4 is broken 2009-06-10 23:28:16 +00:00
Steven Barth
f4c6554f4c Revert "adjust axtls level"
This reverts commit b123c99304822a1f1502d00df4915e2707940df3.
2009-06-07 12:38:37 +00:00
Steven Barth
eb5a7b36ab adjust axtls level 2009-06-07 12:24:30 +00:00
Steven Barth
0ebce1d608 nixio: Add support for DER certificates, PX5G fix Certmaster 2009-06-07 10:15:12 +00:00