<?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>Raim &#187; English</title>
	<atom:link href="http://raim.codingfarm.de/blog/category/english/feed/" rel="self" type="application/rss+xml" />
	<link>http://raim.codingfarm.de/blog</link>
	<description>My personal front yard on the web</description>
	<lastBuildDate>Sun, 29 Jan 2012 23:47:08 +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>Google&#8217;s Privacy Policy over the Years</title>
		<link>http://raim.codingfarm.de/blog/2012/01/30/googles-privacy-policy-over-the-years/</link>
		<comments>http://raim.codingfarm.de/blog/2012/01/30/googles-privacy-policy-over-the-years/#comments</comments>
		<pubDate>Sun, 29 Jan 2012 23:46:27 +0000</pubDate>
		<dc:creator>Rainer Müller</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Society]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[privacy]]></category>
		<category><![CDATA[privacy policy]]></category>

		<guid isPermaLink="false">http://raim.codingfarm.de/blog/?p=333</guid>
		<description><![CDATA[Google&#8217;s Privacy Policy is going to change this March in order to unify up to 60 different policies across all the services Google has to offer. While reading through the new terms, I compared what did change exactly to see if the coverage in other blogs and media is correct. As older versions are still [...]]]></description>
			<content:encoded><![CDATA[<p>Google&#8217;s Privacy Policy is going to change this March in order to unify up to 60 different policies across all the services Google has to offer. While reading through the new terms, I compared what did change exactly to see if the coverage in other blogs and media is correct.</p>
<p>As older versions are still available, I noticed that the beginning of this <a href="https://www.google.com/intl/en/policies/privacy/">Privacy Policy</a> has changed over the years. There used to be a first sentence explaining the general approach Google takes towards your data. But read yourself:</p>
<p><span id="more-333"></span></p>
<p><strong>August 14, 2000</strong>:</p>
<blockquote><p>Google respects and protects the privacy of the individuals that use Google’s search engine services. <sub>[...]</sub></p></blockquote>
<p>Well, that sounds fair.</p>
<p><strong>July 1, 2004</strong>:</p>
<blockquote><p>At Google, we strive to develop innovative services to better serve our users. We recognize that privacy is an important issue, so we design and operate our services with the protection of your privacy in mind. <sub>[...]</sub></p></blockquote>
<p>Hey, they want to bring us innovation. Okay, at least they think about privacy—in the second sentence.</p>
<p><strong>October 14, 2005</strong>,<br />
<strong>August 7, 2008</strong>,<br />
<strong>January 27, 2009</strong>,<br />
<strong>March 11, 2009</strong>:</p>
<blockquote><p>At Google we recognize that privacy is important. <sub>[...]</sub></p></blockquote>
<p>Yes, they are aware that privacy is important, but they might do whatever they want with your data.</p>
<p><strong>October 3, 2010</strong>,<br />
<strong>March 1, 2012</strong></p>
<blockquote><p><sub>[...]</sub></p></blockquote>
<p>From here on, no such sentence exists anymore. I leave it to you what that means.</p>
]]></content:encoded>
			<wfw:commentRss>http://raim.codingfarm.de/blog/2012/01/30/googles-privacy-policy-over-the-years/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Performance improvements in the upcoming Subversion 1.7 release</title>
		<link>http://raim.codingfarm.de/blog/2011/09/10/performance-improvements-in-the-upcoming-subversion-1-7-release/</link>
		<comments>http://raim.codingfarm.de/blog/2011/09/10/performance-improvements-in-the-upcoming-subversion-1-7-release/#comments</comments>
		<pubDate>Sat, 10 Sep 2011 17:46:09 +0000</pubDate>
		<dc:creator>Rainer Müller</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://raim.codingfarm.de/blog/?p=316</guid>
		<description><![CDATA[I just tried out a build from the Subversion 1.7.x branch which appears to come close to a final release. Instead of creating .svn directories everywhere, the new working copy layout switches to a central storage using SQLite. You will only see a single .svn at the top most directory of the working copy. Details [...]]]></description>
			<content:encoded><![CDATA[<p>I just tried out a build from the Subversion 1.7.x branch which appears to come close to a final release. Instead of creating <code>.svn</code> directories everywhere, the new working copy layout switches to a central storage using SQLite. You will only see a single <code>.svn</code> at the top most directory of the working copy. Details are outlined in the preliminary <a href="http://subversion.apache.org/docs/release-notes/1.7.html">release notes</a>.</p>
<p>The following is a totally inaccurate benchmark, but I want to share some numbers. The MacPorts repository used here contains lots of directories with only a few files in each, often only a single file. This makes operations walking the <code>.svn</code> directories in the tree very expensive.</p>
<p>Listing status of files:</p>
<pre>
~/src/macports/trunk-svn $ time svn st

real	3m39.347s
user	0m1.450s
sys	0m5.900s

~/src/macports/trunk-svn17 $ time svn17 st

real	0m23.788s
user	0m1.914s
sys	0m2.297s
</pre>
<p>Update without changes (locking the whole working copy against concurrent access):</p>
<pre>
~/src/macports/trunk-svn $ time svn up
At revision 83750.

real	2m32.855s
user	0m1.202s
sys	0m5.060s

~/src/macports/trunk-svn17 $ time svn17 up
Updating '.':
At revision 83750.

real	0m5.362s
user	0m1.793s
sys	0m1.166s
</pre>
<p>Impressive results!</p>
]]></content:encoded>
			<wfw:commentRss>http://raim.codingfarm.de/blog/2011/09/10/performance-improvements-in-the-upcoming-subversion-1-7-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mission Control grabbed my keyboard shortcuts</title>
		<link>http://raim.codingfarm.de/blog/2011/07/31/mission-control-grabbed-my-keyboard-shortcuts/</link>
		<comments>http://raim.codingfarm.de/blog/2011/07/31/mission-control-grabbed-my-keyboard-shortcuts/#comments</comments>
		<pubDate>Sun, 31 Jul 2011 14:05:41 +0000</pubDate>
		<dc:creator>Rainer Müller</dc:creator>
				<category><![CDATA[English]]></category>

		<guid isPermaLink="false">http://raim.codingfarm.de/blog/?p=308</guid>
		<description><![CDATA[The previous so called &#8220;Spaces&#8221; are now part of &#8220;Mission Control&#8221; in Mac OS X 10.7 Lion. It implements multiple work spaces as known from common Linux desktop environments. Unfortunately it grabs the global keyboard shortcuts Ctrl-1, Ctrl-2, &#8230;, Ctrl-0 and Ctrl-Option-1, Ctrl-Option-2, &#8230;, Ctrl-Option-6 to switch to the corresponding space by default. This prevents [...]]]></description>
			<content:encoded><![CDATA[<p>The previous so called &#8220;Spaces&#8221; are now part of &#8220;Mission Control&#8221; in Mac OS X 10.7 Lion. It implements multiple work spaces as known from common Linux desktop environments.</p>
<p>Unfortunately it grabs the global keyboard shortcuts <em>Ctrl-1</em>, <em>Ctrl-2</em>, &#8230;, <em>Ctrl-0</em> and <em>Ctrl-Option-1</em>, <em>Ctrl-Option-2</em>, &#8230;, <em>Ctrl-Option-6</em> to switch to the corresponding space by default. This prevents using any of these shortcuts in an application. I had defined some of those for use with my favorite editor vim, where the shortcuts ceased to work after the upgrade to Lion.</p>
<p>Even more unfortunate, it&#8217;s a tedious task to stop Mission Control from allocating these keyboard shortcuts. The GUI offers the configuration check boxes only for spaces which are currently enabled.</p>
<p><a href="http://raim.codingfarm.de/blog/wp-content/uploads/2011/07/MissionControlKeyboardShortcuts.png"><img class="size-full wp-image-309 aligncenter" title="MissionControlKeyboardShortcuts" src="http://raim.codingfarm.de/blog/wp-content/uploads/2011/07/MissionControlKeyboardShortcuts.png" alt="" width="404" height="165" /></a></p>
<p>So the solution was to enable <strong>all</strong> possible spaces, which are capped at a maximum of 16, using the Mission Control interface. Then disable the check box for each of them in <em>System Preferences</em> &gt; <em>Keyboard</em> &gt; <em>Keyboard Shortcuts</em>.</p>
<p>As said a tedious task, but works. I was hoping to provide some <em>defaults write</em> command here, but I was unable to determine where these settings are stored.</p>
]]></content:encoded>
			<wfw:commentRss>http://raim.codingfarm.de/blog/2011/07/31/mission-control-grabbed-my-keyboard-shortcuts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>tvtime on Linux kernel 2.6.38 without V4L1 API</title>
		<link>http://raim.codingfarm.de/blog/2011/04/06/tvtime-on-linux-kernel-2-6-38-without-v4l1-api/</link>
		<comments>http://raim.codingfarm.de/blog/2011/04/06/tvtime-on-linux-kernel-2-6-38-without-v4l1-api/#comments</comments>
		<pubDate>Tue, 05 Apr 2011 22:32:15 +0000</pubDate>
		<dc:creator>Rainer Müller</dc:creator>
				<category><![CDATA[English]]></category>

		<guid isPermaLink="false">http://raim.codingfarm.de/blog/?p=294</guid>
		<description><![CDATA[My favorite application for watching analogue TV is tvtime. Unfortunately it has not been updated for a few years now. As is the rule for unmaintained code, the upstream version finally is no longer compatible with Linux kernel 2.6.38. The V4L1 API has now been removed after being deprecated for a really long time. But [...]]]></description>
			<content:encoded><![CDATA[<p>My favorite application for watching analogue TV is <a href="http://tvtime.sourceforge.net">tvtime</a>. Unfortunately it has not been updated for a few years now. As is the rule for unmaintained code, the upstream version finally is no longer compatible with Linux kernel 2.6.38. The <acronym title="Video 4 Linux version 1">V4L1</acronym> API has now been removed after being deprecated for a really long time.</p>
<p>But Devin Heitmueller from <a href="http://www.kernellabs.com/">KernelLabs</a> invested some time to remove the parts from tvtime that still needed the old API. The source is available from <a href="http://www.kernellabs.com/hg/~dheitmueller/tvtime">this mercurial repo</a>.</p>
<pre>
hg clone http://www.kernellabs.com/hg/~dheitmueller/tvtime
cd tvtime
autoreconf -i -f
./configure --prefix=/usr/local --disable-nls
make
make install
</pre>
<p>There is also a <a href="http://bugs.gentoo.org/show_bug.cgi?id=359743">report in Gentoo&#8217;s Bugzilla</a> with a new ebuild attached, but I haven&#8217;t tried that. Installing the new patched tvtime to <code>/usr/local</code> works for now.</p>
<p>I am all ears if anyone can recommend an alternative to tvtime. I know about xawtv, but the interface is poor and offers less features than tvtime.</p>
]]></content:encoded>
			<wfw:commentRss>http://raim.codingfarm.de/blog/2011/04/06/tvtime-on-linux-kernel-2-6-38-without-v4l1-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hauppauge WinTV HVR-1300 with Linux kernel 2.6.38</title>
		<link>http://raim.codingfarm.de/blog/2011/04/06/hauppauge-wintv-hvr-1300-with-linux-kernel-2-6-38/</link>
		<comments>http://raim.codingfarm.de/blog/2011/04/06/hauppauge-wintv-hvr-1300-with-linux-kernel-2-6-38/#comments</comments>
		<pubDate>Tue, 05 Apr 2011 22:05:30 +0000</pubDate>
		<dc:creator>Rainer Müller</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[hauppauge]]></category>
		<category><![CDATA[hvr1300]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[v4l]]></category>

		<guid isPermaLink="false">http://raim.codingfarm.de/blog/?p=288</guid>
		<description><![CDATA[After the upgrade to Linux kernel 2.6.38, the boot process for my machine hang quite long while Populating /dev with existing devices through uevents. After investigations it turns out that the cx88 driver used for my Hauppauge WinTV HVR-1300 tv card was not correctly converted to the new mutex system while removing the BKL. This [...]]]></description>
			<content:encoded><![CDATA[<p>After the upgrade to Linux kernel 2.6.38, the boot process for my machine hang quite long while <code>Populating /dev with existing devices through uevents</code>. After investigations it turns out that the <code>cx88</code> driver used for my Hauppauge WinTV HVR-1300 tv card was not correctly converted to the new mutex system while removing the <acronym title="Big Kernel Lock">BKL</acronym>. This is being tracked in the kernel bugzilla as <a href="https://bugzilla.kernel.org/show_bug.cgi?id=31962">bug #31962</a>.</p>
<p>Fortunately, there is a patch attached to the mentioned bug report which resolves the problem:</p>
<pre>
cd /usr/src/linux
wget -O cx88-2.6.38-fix-driver-deadlocks.patch 'https://bugzilla.kernel.org/attachment.cgi?id=53722'
patch -p1 < cx88-2.6.38-fix-driver-deadlocks.patch
</pre>
<p><em>[Edited on 2011-04-23: replaced patch <a href="https://bugzilla.kernel.org/attachment.cgi?id=52902">52902</a> with <a href="https://bugzilla.kernel.org/attachment.cgi?id=53722">53722</a>]</em></p>
<p>After applying the patch, build and install your kernel as usual. But there are still some more problems with 2.6.38 related to tvtime. See also <a href="/blog/2011/04/06/tvtime-on-linux-kernel-2-6-38-without-v4l1-api/">my next post</a>.</p>
<p>I do not follow kernel development close enough to know in which git tree this has to show up to confirm if it has been merged yet. Hopefully this patch will make it into the next kernel release. </p>
]]></content:encoded>
			<wfw:commentRss>http://raim.codingfarm.de/blog/2011/04/06/hauppauge-wintv-hvr-1300-with-linux-kernel-2-6-38/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>bash: reuse last argument from previous command</title>
		<link>http://raim.codingfarm.de/blog/2011/01/14/bash-reuse-last-argument-from-previous-command/</link>
		<comments>http://raim.codingfarm.de/blog/2011/01/14/bash-reuse-last-argument-from-previous-command/#comments</comments>
		<pubDate>Fri, 14 Jan 2011 00:35:15 +0000</pubDate>
		<dc:creator>Rainer Müller</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://raim.codingfarm.de/blog/?p=255</guid>
		<description><![CDATA[Reuse the last argument of the previous command with !$: $ echo abc def abc def $ echo !$ def A common use case would be mkdir and cd: $ mkdir foo $ cd !$ You can also insert the last argument of the previous command and continue typing with &#60;ESC&#62;.: $ echo abc def [...]]]></description>
			<content:encoded><![CDATA[<p>Reuse the last argument of the previous command with <code>!$</code>:</p>
<pre>
$ echo abc def
abc def
$ echo !$
def
</pre>
<p>A common use case would be <code>mkdir</code> and <code>cd</code>:</p>
<pre>
$ mkdir foo
$ cd !$
</pre>
<p>You can also insert the last argument of the previous command and continue typing with <code>&lt;ESC&gt;.</code>:</p>
<pre>
$ echo abc def
abc def
$ echo &lt;ESC&gt;. ghi
def ghi
</pre>
<p>Oh, the little things… <img src='http://raim.codingfarm.de/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://raim.codingfarm.de/blog/2011/01/14/bash-reuse-last-argument-from-previous-command/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>bash: for-loop with glob patterns</title>
		<link>http://raim.codingfarm.de/blog/2010/09/09/bash-for-loop-with-glob-patterns/</link>
		<comments>http://raim.codingfarm.de/blog/2010/09/09/bash-for-loop-with-glob-patterns/#comments</comments>
		<pubDate>Thu, 09 Sep 2010 14:18:16 +0000</pubDate>
		<dc:creator>Rainer Müller</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://raim.codingfarm.de/blog/?p=233</guid>
		<description><![CDATA[It is common to use a for-loop with glob patterns: for i in *.txt; do mv $i $i.old done But if the glob pattern does not match anything it will be preserved unchanged in the command. This results in command execution of mv *.txt *.txt.old which fails because no file named *.txt (literally!) exists. As [...]]]></description>
			<content:encoded><![CDATA[<p>It is common to use a for-loop with glob patterns:</p>
<pre>
for i in *.txt; do
    mv $i $i.old
done
</pre>
<p>But if the glob pattern does not match anything it will be preserved unchanged in the command. This results in command execution of <code>mv *.txt *.txt.old</code> which fails because no file named <code>*.txt</code> (literally!) exists.</p>
<p>As this is not the desired behavior, here is a way how to do this as expected without forking using the <code>nullglob</code> bash shell option.</p>
<pre>
oldnullglob=$(shopt -p nullglob)
shopt -s nullglob

for i in *.txt; do
    mv $i $i.old
done

eval "$oldnullglob" 2>/dev/null
unset oldnullglob
</pre>
<p>This will silently prevent the execution of the <code>mv</code> command. If you use <code>failglob</code> instead of <code>nullglob</code> bash will interrupt the evaluation of any command if the glob pattern did not match anything.</p>
<p>Disclaimer: Be careful with this option, as this will not be the expected behavior in all cases. Most (in)famously it breaks <code>bash-completion </code> if you set it in your interactive bash session. I suggest to use it temporary only.</p>
]]></content:encoded>
			<wfw:commentRss>http://raim.codingfarm.de/blog/2010/09/09/bash-for-loop-with-glob-patterns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Checking expiry dates of SSL certificates</title>
		<link>http://raim.codingfarm.de/blog/2010/07/03/checking-expiry-dates-of-ssl-certificates/</link>
		<comments>http://raim.codingfarm.de/blog/2010/07/03/checking-expiry-dates-of-ssl-certificates/#comments</comments>
		<pubDate>Sat, 03 Jul 2010 20:31:21 +0000</pubDate>
		<dc:creator>Rainer Müller</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[certificate]]></category>
		<category><![CDATA[cronjob]]></category>
		<category><![CDATA[expiry]]></category>
		<category><![CDATA[openssl]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[x509]]></category>

		<guid isPermaLink="false">http://raim.codingfarm.de/blog/?p=220</guid>
		<description><![CDATA[Once again I missed the expiry date of one of the SSL certificates on my server. Therefore I am now using a cronjob to warn me early enough that a certificate is about to expire. This is the script /usr/local/bin/ssl-cert-check which checks the expiry date of the certificate files passed as arguments: #!/bin/bash DAYS=30 for [...]]]></description>
			<content:encoded><![CDATA[<p>Once again I missed the expiry date of one of the <acronym title="Secure Sockets Layer">SSL</acronym> certificates on my server. Therefore I am now using a cronjob to warn me early enough that a certificate is about to expire.</p>
<p>This is the script <code>/usr/local/bin/ssl-cert-check</code> which checks the expiry date of the certificate files passed as arguments:</p>
<pre>
#!/bin/bash

DAYS=30

for file in "$@"; do
    openssl x509 -checkend $(( 86400 * $DAYS )) -in "$file" > /dev/null
    if [ $? != 0 ]; then
        echo "==> Certificate $file is about to expire soon:"
        openssl x509 -enddate -in "$file" -noout
    fi
done
</pre>
<p>And the corresponding cronjob entry checking <acronym title="Secure Sockets Layer">SSL</acronym> certificates once a day:</p>
<pre>
6       6    * * *   root   /usr/local/bin/ssl-cert-check /etc/apache2/ssl/*.crt /etc/ssl/certs/dovecot.pem
</pre>
]]></content:encoded>
			<wfw:commentRss>http://raim.codingfarm.de/blog/2010/07/03/checking-expiry-dates-of-ssl-certificates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>bitlbee over SSL using stunnel</title>
		<link>http://raim.codingfarm.de/blog/2010/07/02/bitlbee-over-ssl-using-stunnel/</link>
		<comments>http://raim.codingfarm.de/blog/2010/07/02/bitlbee-over-ssl-using-stunnel/#comments</comments>
		<pubDate>Fri, 02 Jul 2010 12:52:41 +0000</pubDate>
		<dc:creator>Rainer Müller</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[bitlbee]]></category>
		<category><![CDATA[im]]></category>
		<category><![CDATA[irc]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[stunnel]]></category>
		<category><![CDATA[xinetd]]></category>

		<guid isPermaLink="false">http://raim.codingfarm.de/blog/?p=155</guid>
		<description><![CDATA[What is this? I prefer IRC as communication protocol for multi-user chat and instant messaging. To keep in contact with users of other protocols/clients I use BitlBee which is a gateway connecting other chat networks like Jabber/XMPP and ICQ to your own IRC server. IRC is a well-established open protocol, but unfortunately it lacks encryption [...]]]></description>
			<content:encoded><![CDATA[<h3>What is this?</h3>
<p>I prefer <acronym title="Internet Relay Chat">IRC</acronym> as communication protocol for multi-user chat and instant messaging. To keep in contact with users of other protocols/clients I use <a href="http://bitlbee.org">BitlBee</a> which is a gateway connecting other chat networks like Jabber/<acronym title="Extensible Messaging and Presence Protocol">XMPP</acronym> and ICQ to your own <acronym title="Internet Relay Chat">IRC</acronym> server.</p>
<p><span id="more-155"></span></p>
<p><acronym title="Internet Relay Chat">IRC</acronym> is a well-established <a href="http://www.ietf.org/rfc/rfc1459.txt">open</a> protocol, but unfortunately it lacks encryption or other measures to secure the transmission of information. I don&#8217;t want to run an open BitlBee server, but password protection in plaintext is quite useless if you are in an untrusted network. Authentication should be done with a challenge-response method to avoid leaking passwords, but <acronym title="Internet Relay Chat">IRC</acronym> as a very old protocol does not offer anything like this. And again communication itself would still be unencrypted.</p>
<p>Many people use their terminal-based <acronym title="Internet Relay Chat">IRC</acronym> client <code>irssi</code> over <abbr title="Secure Shell">SSH</abbr>. This way the client runs on the same machine as <code>bitlbee</code>, so a very simple solution would be to bind the server socket to <code>localhost</code> only in this case. For me this is not an option as I am using a <abbr title="Graphical User Interface">GUI</abbr>-based <acronym title="Internet Relay Chat">IRC</acronym> client <code>xchat</code> locally.</p>
<p>Fortunately it&#8217;s possible to secure any <acronym title="Transmission Control Protocol">TCP</acronym> connection using <acronym title="Secure Sockets Layer">SSL</acronym>!</p>
<p>Unfortunately BitlBee itself does not have builtin <acronym title="Secure Sockets Layer">SSL</acronym> support for the server. But a general solution for this problem exists: <a href="http://stunnel.mirt.net/"><code>stunnel</code></a>. This program acts as a general wrapper around any stream socket based program and is often in use for <code>inetd</code> based services.</p>
<h3>Setup instructions</h3>
<p>The following instructions are for setting up <code>bitlbee</code> over <code>xinetd</code> with <code>stunnel</code> to secure the connections. Be aware that this <code>inetd</code> approach will spawn a new process for each incoming connection. This setup is not meant to serve many users at once, but works fine for personal use.</p>
<p>First we have to generate and self-sign a new certificate to be used with <acronym title="Secure Sockets Layer">SSL</acronym>:</p>
<pre>
# openssl req -new -newkey rsa:1024 -days 365 -nodes -x509 -keyout /etc/stunnel/bitlbee.pem -out /etc/stunnel/bitlbee.pem
</pre>
<p>Usually you need to be root to write to <code>/etc/stunnel</code>. Of course you can also use a pre-existing certificate signed by a well-known <abbr title="Certificate Authority">CA</abbr> or request a new one.</p>
<p>Only <code>stunnel</code> for BitlBee needs to read the certificate file, so we will need a new user <code>bitlbee</code> for this purpose. On my Debian system the package management already added such a user, so your mileage may vary.</p>
<pre>
# adduser --system --group --disabled-login --disabled-password --home /var/lib/bitlbee/ bitlbee
# chmod 700 /var/lib/bitlbee/
# chown bitlbee:bitlbee /etc/stunnel/bitlbee.pem
</pre>
<p>Then we need to set up <code>xinetd</code> to secure the connection using <code>stunnel</code>. I modified the <a href="http://bugs.bitlbee.org/bitlbee/browser/devel/doc/bitlbee.xinetd?rev=devel%2C134">basic configuration file</a> provided with the BitlBee source for this; changes are marked in bold text below. The following file should be saved as <code>/etc/xinetd.d/bitlbee</code>:</p>
<pre>
## xinetd file for BitlBee. Please check this file before using it, the
## user, port and/or binary location might be wrong.

## This file assumes you have ircd somewhere in your /etc/services, if things
## don't work, check that file first.
service ircd
{
        socket_type     = stream
        protocol        = tcp
        wait            = no

        ## You most likely want to change these two
        <strong>user            = bitlbee</strong>
        <strong>server          = /usr/bin/stunnel</strong>
        <strong>server_args     = -p /etc/stunnel/bitlbee.pem -l /usr/local/sbin/bitlbee</strong>

        ## You might want to limit access to localhost only:
        # bind            = 127.0.0.1

        ## Thanks a lot to friedman@splode.com for telling us about the type
        ## argument, so now this file can be used without having to edit
        ## /etc/services too.
        type            = UNLISTED
        port            = 6667
}
</pre>
<p>After the file is in place, <code>xinetd</code> configuration files need to be read again:</p>
<pre>
# /etc/init.d/xinetd reload
</pre>
<p>Now you should be able to connect to <code>bitlbee</code> using your favorite IRC client! Make sure you enable <acronym title="Secure Sockets Layer">SSL</acronym> for this connection. If you are using a self-signed certificate you will have to verify it, of course.</p>
<p>For bitlbee usage, you should refer to the <a href="http://www.bitlbee.org/main.php/extdoc.html">official documentation</a>. And maybe I will also write down some basic setup instructions for a closed server in the near future&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://raim.codingfarm.de/blog/2010/07/02/bitlbee-over-ssl-using-stunnel/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>pastie.org shell script</title>
		<link>http://raim.codingfarm.de/blog/2010/04/06/pastie-org-shell-script/</link>
		<comments>http://raim.codingfarm.de/blog/2010/04/06/pastie-org-shell-script/#comments</comments>
		<pubDate>Tue, 06 Apr 2010 00:53:15 +0000</pubDate>
		<dc:creator>Rainer Müller</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[pastie]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://raim.codingfarm.de/blog/?p=148</guid>
		<description><![CDATA[I wrote a bash script to create new pastes on pastie.org. It features automatic source language selection based on the file extension and has a switch to make a private paste. $ pastie --help Usage: pastie [options] [files...] Options: -h, --help display this help -l, --lang set language of the paste -p, --private make paste [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote a bash script to create new pastes on <a href="http://pastie.org">pastie.org</a>. It features automatic source language selection based on the file extension and has a switch to make a private paste.</p>
<pre>
$ pastie --help
Usage: pastie [options] [files...]

Options:
    -h, --help          display this help
    -l, --lang <lang>   set language of the paste
    -p, --private       make paste private

If --lang is not specified, this script will try to determine the type of each
file automatically based on the extension. If no files are given on the
command line it reads from standard input.
</pre>
<p>You can download it here:<br />
<a href="http://pastie.org/904797">http://pastie.org/904797</a></p>
<p>The script is public domain, so do whatever you want with it.</p>
<p>Although this is the initial release, I bumped the version number to 1.6 already. During testing the script I pasted itself several times to <a href="http://pastie.org">pastie.org</a>. I set a arbitrary higher version number to avoid confusion in case the previous pastes ever turn up in Google or wherever.</p>
<p><strong>Update:</strong><br />
Seems like their parser for shell is a bit broken and doubles the heredoc starting and ending sequences in the output. For whatever reason it appears as &#8220;&lt;&lt;END&lt;&lt;END&#8221;. Please use the <a href="http://pastie.org/904797.txt">raw version</a> for download instead of copy &#038; paste.</p>
]]></content:encoded>
			<wfw:commentRss>http://raim.codingfarm.de/blog/2010/04/06/pastie-org-shell-script/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

