<?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; Samba</title>
	<atom:link href="http://blog.cryptomilk.org/tag/samba/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.cryptomilk.org</link>
	<description>a cosmological pedestrian</description>
	<lastBuildDate>Mon, 23 Jan 2012 09:21:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Documenting the Source</title>
		<link>http://blog.cryptomilk.org/2010/02/10/documenting-source-code/</link>
		<comments>http://blog.cryptomilk.org/2010/02/10/documenting-source-code/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 14:23:26 +0000</pubDate>
		<dc:creator>Andreas Schneider</dc:creator>
				<category><![CDATA[KDE]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[doc]]></category>
		<category><![CDATA[doxygen]]></category>
		<category><![CDATA[Samba]]></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 and how. ...]]></description>
			<content:encoded><![CDATA[<p>As you maybe know I have a new job since last December and I&#8217;m working on<br />
Samba4 now. Samba4 is a monster so I&#8217;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&#8217;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&#8217;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&#8217;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&#8217;t undocumented it<br />
had a text file describing everything but having doxygen documentation is much<br />
nicer than a text file. So I&#8217;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&#8217;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&#8217;s what I&#8217;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>
<p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://blog.cryptomilk.org/2010/02/10/documenting-source-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automatic testing of PAM modules</title>
		<link>http://blog.cryptomilk.org/2009/04/29/automatic-testing-of-pam-modules/</link>
		<comments>http://blog.cryptomilk.org/2009/04/29/automatic-testing-of-pam-modules/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 16:40:29 +0000</pubDate>
		<dc:creator>Andreas Schneider</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 ...]]></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 &#8220;pam.d&#8221; config directory for testing. You should be able to change the config and mess it up without getting locked out.</p>
<p>I&#8217;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&#8217;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&#8217;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>
<p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://blog.cryptomilk.org/2009/04/29/automatic-testing-of-pam-modules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Roaming Home Directories for Linux</title>
		<link>http://blog.cryptomilk.org/2008/07/04/roaming-home-directories-for-linux/</link>
		<comments>http://blog.cryptomilk.org/2008/07/04/roaming-home-directories-for-linux/#comments</comments>
		<pubDate>Fri, 04 Jul 2008 10:09:16 +0000</pubDate>
		<dc:creator>Andreas Schneider</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[file synchronization]]></category>
		<category><![CDATA[roaming home directories]]></category>
		<category><![CDATA[Samba]]></category>

		<guid isPermaLink="false">http://blog.cynapses.org/?p=31</guid>
		<description><![CDATA[An interesting feature of Active Directory is Roaming Profiles. You can login on different workstations and you have all you data with you. If you use a Notebook you have the same and the ability to work offline. As soon as you're connected to you network again the data will be automatically synchronized again ...]]></description>
			<content:encoded><![CDATA[<p>An interesting feature of Active Directory is Roaming Profiles. You can login on different workstations and you have all you data with you. If you use a Notebook you have the same and the ability to work offline. As soon as you&#8217;re connected to you network again the data will be automatically synchronized again and you have a backup of your data.</p>
<p><img src="http://blog.cynapses.org/wp-content/uploads/2008/07/_roaminghome.png" alt="" title="Roaming Home Directories"class="alignnone size-medium wp-image-32" /></p>
<p>Now the time has come to introduce Roaming Home Directories for Linux. Yesterday I&#8217;ve released a new version of <a href="http://www.csync.org/">csync</a> and the first version of <a href="http://www.csync.org/2008/07/03/pam_csync-0420-alpha1/">pam_csync</a>. With both components you&#8217;re able to use an Active Directory environment to share your data between workstation and notebooks and work offline.</p>
<p>Currently only the SMB protocol is supported but I will write more plugins for other protocols in future. I have sftp and rsync (if doable) in mind. So you will be able to use it at home with you&#8217;re small NAS or in a Linux only company environment.</p>
<p>This is not the only use case. If you have a USB disk with your music collection. You can can attach it to PC1 and synchronize it with your local collection. Go to the next computer and synchronize it there again. As csync is a bidirectional file synchronizer the collection on PC1 and PC2 will be the same.</p>
<p><a href="http://www.csync.org/">http://www.csync.org/</a></p>
<p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://blog.cryptomilk.org/2008/07/04/roaming-home-directories-for-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>csync 0.42.0 alpha1</title>
		<link>http://blog.cryptomilk.org/2008/06/02/csync-0420-alpha1/</link>
		<comments>http://blog.cryptomilk.org/2008/06/02/csync-0420-alpha1/#comments</comments>
		<pubDate>Mon, 02 Jun 2008 15:05:56 +0000</pubDate>
		<dc:creator>Andreas Schneider</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[SUSE]]></category>
		<category><![CDATA[file synchronization]]></category>
		<category><![CDATA[roaming home directories]]></category>
		<category><![CDATA[Samba]]></category>

		<guid isPermaLink="false">http://blog.cynapses.org/?p=29</guid>
		<description><![CDATA[I've released the first alpha version of csync. csync is a client only bidirectional file synchronizer. You can use csync for different things. The intention is to provide Roaming Home Directories for Linux but you can use it to synchronize your music collection or create a backup of a directory. This is *not* intended ...]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve released the first alpha version of csync. csync is a client only bidirectional file synchronizer. You can use csync for different things. The intention is to provide Roaming Home Directories for Linux but you can use it to synchronize your music collection or create a backup of a directory. This is *not* intended for production environments and is designed for testing purposes only. This version is fully functional and you can sync two local directories or a local directory with a samba share.</p>
<p>More at <a href="http://www.csync.org/">http://www.csync.org/</a></p>
<p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://blog.cryptomilk.org/2008/06/02/csync-0420-alpha1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

