<feed xmlns='http://www.w3.org/2005/Atom'>
<title>luci/libs/nixio, branch 0.11.0</title>
<subtitle>Lua Configuration Interface (mirror)</subtitle>
<id>https://git.openwrt.org/project/luci/atom?h=0.11.0</id>
<link rel='self' href='https://git.openwrt.org/project/luci/atom?h=0.11.0'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/'/>
<updated>2012-10-29T12:52:27Z</updated>
<entry>
<title>Fix nixio exece()</title>
<updated>2012-10-29T12:52:27Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2012-10-29T12:52:27Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=06901331f5c8a0cfdb19520e1feed90fd4415b32'/>
<id>urn:sha1:06901331f5c8a0cfdb19520e1feed90fd4415b32</id>
<content type='text'>
I had occasion to use nixio.exece() recently and I could not figure out what it
wanted for the third argument (the environment) as no matter what sort of table
I passed, even nixio.getenv(), would fail with bad argument #3 to 'exece'
(invalid environment).

What it should expect is a table full of string values for keys and something
that can be converted to a string as a value, however it inverts the value of
lua_type() and compares it against a type, which will never evaluate to true.

Getting past this, the code inserts the KEY=VALUE string before the arg userdata,
and then forgets to take the env userdata into account when collecting the
arguments back into a C char**. This patch addresses all these issues and
provides a working nixio.exece().

[Fixes #500]
</content>
</entry>
<entry>
<title>[PATCH] nixio HAS_SHADOW test link error</title>
<updated>2012-08-29T13:04:44Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2012-08-29T13:04:44Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=ec5487649e426957370a1dc30aacd32fb57ad691'/>
<id>urn:sha1:ec5487649e426957370a1dc30aacd32fb57ad691</id>
<content type='text'>
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.

</content>
</entry>
<entry>
<title>libs/nixio: add missing parameter to alarm reset</title>
<updated>2012-08-27T14:54:37Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2012-08-27T14:54:37Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=1916ab494aa72e05e9c04363a2a67c17d2b93eb0'/>
<id>urn:sha1:1916ab494aa72e05e9c04363a2a67c17d2b93eb0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>libs/nixio: cancel pending alarm after successfully returning from getnameinfo()</title>
<updated>2012-08-27T14:54:07Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2012-08-27T14:54:07Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=54567e57ea9e98e2384a82088e63062134b9b920'/>
<id>urn:sha1:54567e57ea9e98e2384a82088e63062134b9b920</id>
<content type='text'>
</content>
</entry>
<entry>
<title>libs/nixio: implement optional timeout for getnameinfo() on Linux</title>
<updated>2012-08-27T14:36:47Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2012-08-27T14:36:47Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=c755e818c402e1f307a37cc90d0e8dfc3087b4c1'/>
<id>urn:sha1:c755e818c402e1f307a37cc90d0e8dfc3087b4c1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>libs/nixio: reorder linker commandline args to fix build on Ubuntu 11.x</title>
<updated>2012-03-13T22:45:26Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2012-03-13T22:45:26Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=005fd26cf6afbf536cda69a7d235de718520b541'/>
<id>urn:sha1:005fd26cf6afbf536cda69a7d235de718520b541</id>
<content type='text'>
</content>
</entry>
<entry>
<title>libs/nixio: disable TLS implementation by default, fixes host builds on Ubuntu 11.x</title>
<updated>2012-03-13T22:11:27Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2012-03-13T22:11:27Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=e620bdac3e56250e9df991499d1451e5abd2502e'/>
<id>urn:sha1:e620bdac3e56250e9df991499d1451e5abd2502e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[PATCH] Abstract address UNIX sockets not binding properly (by capnbry@gmail.com, #366)</title>
<updated>2011-12-16T02:10:37Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2011-12-16T02:10:37Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=ca7bc48ebc0b1f655088eaae89bd358556dc8824'/>
<id>urn:sha1:ca7bc48ebc0b1f655088eaae89bd358556dc8824</id>
<content type='text'>
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).

</content>
</entry>
<entry>
<title>libs/nixio: link with libcrypto when using OpenSSL as digest backend</title>
<updated>2011-11-20T18:18:46Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2011-11-20T18:18:46Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=3face708593d3de417b93472b827d05a8a5813fb'/>
<id>urn:sha1:3face708593d3de417b93472b827d05a8a5813fb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>libs/nixio: remove forgotten stamp file</title>
<updated>2011-10-24T21:39:47Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2011-10-24T21:39:47Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=621fff61a32d6533258a3fb2e09749a26b1cf5c6'/>
<id>urn:sha1:621fff61a32d6533258a3fb2e09749a26b1cf5c6</id>
<content type='text'>
</content>
</entry>
</feed>
