<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Andreas Schneider &#187; Linux</title>
	<atom:link href="http://blog.cynapses.org/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.cynapses.org</link>
	<description>a cosmological pedestrian</description>
	<lastBuildDate>Tue, 23 Feb 2010 10:17:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Documenting the Source</title>
		<link>http://blog.cynapses.org/2010/02/10/documenting-source-code/</link>
		<comments>http://blog.cynapses.org/2010/02/10/documenting-source-code/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 14:23:26 +0000</pubDate>
		<dc:creator>GlaDiaC</dc:creator>
				<category><![CDATA[KDE]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.cynapses.org/?p=136</guid>
		<description><![CDATA[As you maybe know I have a new job since last December and I'm working on Samba4 now. Samba4 is a monster so I've asked for some simple tasks to get started. The task was to migrate some code to a new Samba library called tsocket. The problem was I didn't know what to do [...]]]></description>
			<content:encoded><![CDATA[<p>As you maybe know I have a new job since last December and I'm working on<br />
Samba4 now. Samba4 is a monster so I've asked for some simple tasks to get<br />
started. The task was to migrate some code to a new Samba library called<br />
tsocket. The problem was I didn't know what to do and how. Some functions<br />
of the API were documented but not all. So I had to guess from the names<br />
what the function is doing and read the code to understand it. Then I've<br />
started to work with the interface and I had to look again the the code to<br />
find out possible return values. In the end I spent a lot of time jumping<br />
through the source code to find out the return values for the functions.</p>
<p>If the API would be completely documented I could get my work done a lot of<br />
faster so I simply started to document it cause I had to understand it anyway.<br />
I've decided to write the documentation with doxygen and put it in the header<br />
file, so that people who use the PAI always have the documentation with them.</p>
<p>After I finished it, started to work on the source code again and got some<br />
things working as I was able to understand the API of the library. Then I<br />
crossed the next undocumented API of a library. Ok, it wasn't undocumented it<br />
had a text file describing everything but having doxygen documentation is much<br />
nicer than a text file. So I've started to document <a href="http://talloc.samba.org/">talloc</a> from Samba4 with<br />
doxygen.</p>
<p>The talloc API uses macros for a lot of things to make debugging easier or<br />
to hide things you're doing from the user. However if you document a macro<br />
than normally you want that it looks like a function. To be able to do that<br />
with doxygen you have to use a little trick. As doxygen has a C preprocessor<br />
built in you can create a define for a doxygen mode. That's what I've done in<br />
the config file and all you need to do in the source code is to use it with<br />
#ifdef.</p>
<p><code>#ifdef DOXYGEN<br />
/**<br />
 * @brief Create a new talloc context.<br />
 *<br />
 * The talloc() macro is the core of the talloc library. It takes a memory<br />
 * context and a type, and returns a pointer to a new area of memory of the<br />
 * given type.<br />
 *<br />
 * The returned pointer is itself a talloc context, so you can use it as the<br />
 * context argument to more calls to talloc if you wish.<br />
 *<br />
 * The returned pointer is a "child" of the supplied context. This means that if<br />
 * you talloc_free() the context then the new child disappears as well.<br />
 * Alternatively you can free just the child.<br />
 *<br />
 * @param[in]  ctx      A talloc context to create a new reference on or NULL to<br />
 *                      create a new top level context.<br />
 *<br />
 * @param[in]  type     The type of memory to allocate.<br />
 *<br />
 * @return              A type casted talloc context or NULL on error.<br />
 *<br />
 * @code<br />
 *      unsigned int *a, *b;<br />
 *<br />
 *      a = talloc(NULL, unsigned int);<br />
 *      b = talloc(a, unsigned int);<br />
 * @endcode<br />
 *<br />
 * @see talloc_zero<br />
 * @see talloc_array<br />
 * @see talloc_steal<br />
 * @see talloc_free<br />
 */<br />
void *talloc(const void *ctx, #type);<br />
#else<br />
#define talloc(ctx, type) (type *)talloc_named_const(ctx, sizeof(type), #type)<br />
void *_talloc(const void *context, size_t size);<br />
#endif<br />
</code></p>
<p>So start to document your API. What you get well be something like <a href="http://talloc.samba.org/">this</a> and other will love it!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.cynapses.org/2010/02/10/documenting-source-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>csync at FOSDEM</title>
		<link>http://blog.cynapses.org/2010/02/01/csync-at-fosdem/</link>
		<comments>http://blog.cynapses.org/2010/02/01/csync-at-fosdem/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 15:25:22 +0000</pubDate>
		<dc:creator>GlaDiaC</dc:creator>
				<category><![CDATA[KDE]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.cynapses.org/?p=132</guid>
		<description><![CDATA[I'm currently updating csync to work with libssh 0.4 and I will give a lightning talk about csync at FOSDEM next weekend. csync is a file synchronizer to keep two folders in sync. This can be local or remote. The main purpose of csync is to provide Roaming Home Directories. I will work with Aris [...]]]></description>
			<content:encoded><![CDATA[<p>I'm currently updating <a href="http://www.csync.org/">csync</a> to work with <a href="http://www.libssh.org/">libssh</a> 0.4 and I will give a <a href="http://www.fosdem.org/2010/schedule/tracks/lightningtalks">lightning talk</a> about csync at <a href="http://www.fosdem.org">FOSDEM</a> next weekend. csync is a file synchronizer to keep two folders in sync. This can be local or remote. The main purpose of csync is to provide <a href="http://www.csync.org/userguide/">Roaming Home Directories</a>.</p>
<p>I will work with <a href="http://blog.0xbadc0de.be/">Aris</a> on libssh stuff and try to get some small features in KDE for kio_sftp. I heard that some KDE guys are around too. I hope to see you there.</p>
<p>If you're a Samba developer and go to FOSDEM, let me know <img src='http://blog.cynapses.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.cynapses.org/2010/02/01/csync-at-fosdem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mlmmj webarchiver</title>
		<link>http://blog.cynapses.org/2009/09/13/mlmmj-webarchiver/</link>
		<comments>http://blog.cynapses.org/2009/09/13/mlmmj-webarchiver/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 10:49:20 +0000</pubDate>
		<dc:creator>GlaDiaC</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.cynapses.org/?p=125</guid>
		<description><![CDATA[I run mlmmj (mailinglist management made joyful) for my mailing lists. The problem was, that I didn't have any mailinglist webarchives for a long time. I had to change this so I started on Friday to changes this. It took me the whole day to write the scripts. mlmmj-webarchiver has been written by Sven Michels [...]]]></description>
			<content:encoded><![CDATA[<p>I run <a href="http://mlmmj.org/">mlmmj</a> (mailinglist management made joyful) for my mailing lists. The problem was, that I didn't have any mailinglist webarchives for a long time. I had to change this so I started on Friday to changes this. It took me the whole day to write the scripts. mlmmj-webarchiver has been written by Sven Michels using hypermail. As hypermail is more or less a dead project I decided to use mhonarc. So I started to rewrite the script and use the theme the <a href="http://www.roundcube.net/">roundcube</a> project created.</p>
<p>You can see the result here:</p>
<p><a href="http://www.libssh.org/archive/">http://www.libssh.org/archive/</a><br />
<a href="http://www.csync.org/archive/">http://www.csync.org/archive/</a></p>
<p>I've created a git repository for the mlmmj-webarchiver:</p>
<p>git clone git://git.cynapses.org/users/gladiac/mlmmj-webarchiver.git</p>
<p>Patches are welcome <img src='http://blog.cynapses.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.cynapses.org/2009/09/13/mlmmj-webarchiver/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>undefined reference to &#8220;function name&#8221;</title>
		<link>http://blog.cynapses.org/2009/08/24/undefined-reference-to-function/</link>
		<comments>http://blog.cynapses.org/2009/08/24/undefined-reference-to-function/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 20:11:00 +0000</pubDate>
		<dc:creator>GlaDiaC</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[SUSE]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[linker]]></category>

		<guid isPermaLink="false">http://blog.cynapses.org/?p=118</guid>
		<description><![CDATA[Since hermes is flooding my mailbox I haven't looked if all my packages are compiling on Factory. So I had a look for interesting emails today. ctrlproxy (irc proxy/bouncer) didn't build with undefined reference to "". I wondered if the libarary packages have been renamed, but everything looked fine. I've talked to darix and he [...]]]></description>
			<content:encoded><![CDATA[<p>Since <a href="http://hermes.opensuse.org/">hermes</a> is flooding my mailbox I haven't looked if all my packages are compiling on Factory. So I had a look for interesting emails today. <a href="http://www.ctrlproxy.org/">ctrlproxy</a> (irc proxy/bouncer) didn't build with undefined reference to "<function-name>". I wondered if the libarary packages have been renamed, but everything looked fine. I've talked to darix and he told me about the --as-needed flag of the linker which is set by default now. I've searched for some documentation didn't find something which explains the problems so here is my documentation.</p>
<p>The problem is the linking order of the libraries and source code! Lets look at an example:</p>
<p>Assume that you built a static library libwurst and it uses the pow() function from the math library.</p>
<p><code> $ gcc -Wl,--as-needed --static main.c -o wurstsalat -L. -lm -lwurst<br />
 ./libwurst.a(wurst.o): In function `wurst':<br />
 wurst.c:(.text+0x29): undefined reference to `pow'</code></p>
<p>The problem here is, that the linker doesn't find any reference to pow() in main.c. Then the first library is libm and as it is not needed, the linker skips it. So you have to link against libwurst.a before you link against libm.</p>
<p><code> $ gcc -Wl,--as-needed --static main.c -o wurstsalat -L. -lwurst -lm</code></p>
<p>To summarize it: <strong>When using --as-needed, the order in which the libraries appear in the command line is relevant: any library X must precede all libraries Y that offer symbols that X uses.</strong></p>
<p>I've created a page in the openSUSE wiki, you can find it <a href="http://en.opensuse.org/Packaging/Fixing">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.cynapses.org/2009/08/24/undefined-reference-to-function/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>kio_sftp authentication with libssh works</title>
		<link>http://blog.cynapses.org/2009/07/21/kio_sftp-authentication-with-libssh-works/</link>
		<comments>http://blog.cynapses.org/2009/07/21/kio_sftp-authentication-with-libssh-works/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 12:24:49 +0000</pubDate>
		<dc:creator>GlaDiaC</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[SFTP]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://blog.cynapses.org/?p=96</guid>
		<description><![CDATA[I've got the fingerprint verification and authentication with public key and keyboard interactive working. There is still a dialog missing for special interactive questions, but the normal user stuff works just fine.]]></description>
			<content:encoded><![CDATA[<p>I've got the fingerprint verification and authentication with public key and keyboard interactive working. There is still a dialog missing for special interactive questions, but the normal user stuff works just fine.</p>
<p><a href="http://blog.cynapses.org/wp-content/uploads/2009/07/kio_sftp.png" target=_blank"><img class="alignnone size-thumbnail wp-image-97" title="kio_sftp" src="http://blog.cynapses.org/wp-content/uploads/2009/07/kio_sftp-150x150.png" alt="kio_sftp" width="150" height="150" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.cynapses.org/2009/07/21/kio_sftp-authentication-with-libssh-works/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>csync with sftp support</title>
		<link>http://blog.cynapses.org/2009/05/26/csync-with-sftp-support/</link>
		<comments>http://blog.cynapses.org/2009/05/26/csync-with-sftp-support/#comments</comments>
		<pubDate>Tue, 26 May 2009 09:23:43 +0000</pubDate>
		<dc:creator>GlaDiaC</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[file synchronization]]></category>
		<category><![CDATA[SFTP]]></category>

		<guid isPermaLink="false">http://blog.cynapses.org/?p=87</guid>
		<description><![CDATA[I've released a new version of csync with sftp support. csync is a bidirectional file synchronizer for Linux and allows to keep two copies of files and directories in sync. It uses widely adopted protocols like smb or sftp so that there is no need for a server component of csync. It is a user-level [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.csync.org/2009/05/25/csync-0430-stable/">I've released</a> a new version of <a href="http://www.csync.org/">csync</a> with <a href="http://www.libssh.org/">sftp</a> support. csync is a bidirectional file synchronizer for Linux and allows to keep two copies of files and directories in sync. It uses widely adopted protocols like smb or sftp so that there is no need for a server component of csync. It is a user-level program which means there is no need to be a superuser.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.cynapses.org/2009/05/26/csync-with-sftp-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>libssh 0.3.0</title>
		<link>http://blog.cynapses.org/2009/05/21/libssh-030/</link>
		<comments>http://blog.cynapses.org/2009/05/21/libssh-030/#comments</comments>
		<pubDate>Thu, 21 May 2009 14:09:50 +0000</pubDate>
		<dc:creator>GlaDiaC</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[SFTP]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://blog.cynapses.org/?p=83</guid>
		<description><![CDATA[After several month of hard work, rewriting nearly all libssh functions, I've released version 0.3.0 today. Read more about the release here. A new version of csync with full sftp support will be released soon.]]></description>
			<content:encoded><![CDATA[<p>After several month of hard work, rewriting nearly all <a href="http://www.libssh.org/">libssh</a> functions, I've released version 0.3.0 today. Read more about the release <a href="http://www.libssh.org/2009/05/21/libssh-3/">here</a>. A new version of csync with full sftp support will be released soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.cynapses.org/2009/05/21/libssh-030/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Automatic testing of PAM modules</title>
		<link>http://blog.cynapses.org/2009/04/29/automatic-testing-of-pam-modules/</link>
		<comments>http://blog.cynapses.org/2009/04/29/automatic-testing-of-pam-modules/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 16:40:29 +0000</pubDate>
		<dc:creator>GlaDiaC</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PAM]]></category>
		<category><![CDATA[Samba]]></category>

		<guid isPermaLink="false">http://blog.cynapses.org/?p=64</guid>
		<description><![CDATA[Last week at the SambaXP conference I had a discussion with Günther Deschner about the testing of PAM modules. What we want to do is automatic testing. To achieve this in the Samba build farm you need a separate "pam.d" config directory for testing. You should be able to change the config and mess it [...]]]></description>
			<content:encoded><![CDATA[<p>Last week at the <a href="http://www.sambaxp.org/">SambaXP</a> conference I had a discussion with <a href="http://www.samba.org/~gd/">Günther Deschner</a> about the testing of <a href="http://www.kernel.org/pub/linux/libs/pam/">PAM</a> modules. What we want to do is automatic testing. To achieve this in the Samba build farm you need a separate "pam.d" config directory for testing. You should be able to change the config and mess it up without getting locked out.</p>
<p>I've introduced a new function to PAM called <tt>pam_start_test()</tt> which takes and additional argument where you can specify the config directory. After this I've changed the call in <a href="http://pamtester.sourceforge.net/">pamtester</a> and added a commandline option for the config directory. To do automatic testing I've added another commandline option to specify the password to use for authentication.</p>
<p><code>gladiac@maximegalon:~> pamtester -v -C/tmp/pam.d -Psecret login csync authenticate<br />
pamtester: invoking pam_start(login, csync, ...)<br />
pamtester: performing operation - authenticate<br />
pamtester: successfully authenticated</code></p>
<p>You can find the patches <a href="http://www.cynapses.org/tmp/patches/pam/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.cynapses.org/2009/04/29/automatic-testing-of-pam-modules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>This and that</title>
		<link>http://blog.cynapses.org/2009/04/27/this-and-that/</link>
		<comments>http://blog.cynapses.org/2009/04/27/this-and-that/#comments</comments>
		<pubDate>Mon, 27 Apr 2009 08:29:51 +0000</pubDate>
		<dc:creator>GlaDiaC</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[file synchronization]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[talks]]></category>

		<guid isPermaLink="false">http://blog.cynapses.org/?p=60</guid>
		<description><![CDATA[You can find the slides of my csync talk at SambaXP 2009 here. libssh 0.3 is on the way. I'm improving the last parts of it. A new release should be available next week. As soon as libssh 0.3 is released I will release a new version of csync with sftp support too!]]></description>
			<content:encoded><![CDATA[<ul>
<li>You can find the slides of my <a href="http://www.csync.org/">csync</a> talk at <a href="http://www.sambaxp.org/">SambaXP</a> 2009 <a href="http://www.csync.org/files/talks/2009-sambaxp-csync.pdf">here</a>.</li>
<li><a href="http://www.libssh.org/">libssh</a> 0.3 is on the way. I'm improving the last parts of it. A new release should be available next week.</li>
<li>As soon as libssh 0.3 is released I will release a new version of csync with sftp support too!</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.cynapses.org/2009/04/27/this-and-that/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ssh-agent client support for libssh</title>
		<link>http://blog.cynapses.org/2009/02/09/ssh-agent-client-support-for-libssh/</link>
		<comments>http://blog.cynapses.org/2009/02/09/ssh-agent-client-support-for-libssh/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 10:12:59 +0000</pubDate>
		<dc:creator>GlaDiaC</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[SFTP]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://blog.cynapses.org/?p=55</guid>
		<description><![CDATA[As you might know I develop csync which is a file synchronizer. To support sftp I'm using libssh. libssh is designed to be used by programmers needing a working SSH implementation by the mean of a library. I think it is nearly feature complete. I've cleaned up the sftp interface last year. The only thing [...]]]></description>
			<content:encoded><![CDATA[<p>As you might know I develop <a href="http://www.csync.org/">csync</a> which is a <a href="http://www.csync.org/about">file synchronizer</a>. To support sftp I'm using <a href="http://www.libssh.org/">libssh</a>. libssh is designed to be used by programmers needing a working SSH implementation by the mean of a library. I think it is nearly feature complete. I've cleaned up the sftp interface last year. The only thing missing was ssh-agent support. This is implemented now in the subversion trunk and will be released as libssh 0.3. I hope we can do a release soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.cynapses.org/2009/02/09/ssh-agent-client-support-for-libssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
