<?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>freedom blog reloaded &#187; Technology</title>
	<atom:link href="http://blog.peijnik.at/topics/technology/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.peijnik.at</link>
	<description>Stephan's Free Software blog</description>
	<lastBuildDate>Tue, 10 Nov 2009 18:04:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Android&#8217;s roaming detection &amp; its implementation</title>
		<link>http://blog.peijnik.at/2009/11/08/androids-roaming-detection-its-implementation/</link>
		<comments>http://blog.peijnik.at/2009/11/08/androids-roaming-detection-its-implementation/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 19:04:32 +0000</pubDate>
		<dc:creator>stephan</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[foss]]></category>
		<category><![CDATA[free software]]></category>
		<category><![CDATA[gsoc]]></category>

		<guid isPermaLink="false">http://blog.peijnik.at/?p=173</guid>
		<description><![CDATA[I know I wrote about Android already today, but there is another thing that concerns me right now. I am owner of an Android-based phone (an HTC Dream) and recently switched my mobile network provider. The problem is that my new provider is a virtual provider and as such there is no real network of [...]]]></description>
			<content:encoded><![CDATA[<p>I know I wrote about Android already today, but there is another thing that concerns me right now. I am owner of an Android-based phone (an HTC Dream) and recently switched my mobile network provider. The problem is that my new provider is a <a href="http://en.wikipedia.org/wiki/Mobile_Virtual_Network_Operator">virtual provider</a> and as such there is no real network of that provider. Now Android has a feature to turn off broadband connections when in roaming mode, which itself is a great idea and can save you from paying quite a lot of money when the phone connects to 3G abroad, but this feature also turns off broadband connections when roaming locally. All this is being discussed in bug report <a href="http://code.google.com/p/android/issues/detail?id=3499">#3499</a>.</p>
<p>After noticing this problem I became curious on how Android detects that it is roaming and I found the GsmServiceStateTracker.isRoamingBetweenOperators method to be responsible for that magic, but soon noticed that the method is not only inefficient, but also doesn&#8217;t work as intended. This is hardly related to the bug mentioned above, but let&#8217;s have a look at the code in question:</p>
<pre name="code" class="java">/**
* Set roaming state when gsmRoaming is true and, if operator mcc is the
* same as sim mcc, ons is different from spn
* @param gsmRoaming TS 27.007 7.2 CREG registered roaming
* @param s ServiceState hold current ons
* @return true for roaming state set
*/
    private
    boolean isRoamingBetweenOperators(boolean gsmRoaming, ServiceState s) {
        String spn = SystemProperties.get(PROPERTY_ICC_OPERATOR_ALPHA, "empty");

        String onsl = s.getOperatorAlphaLong();
        String onss = s.getOperatorAlphaShort();

        boolean equalsOnsl = onsl != null &amp;&amp; spn.equals(onsl);
        boolean equalsOnss = onss != null &amp;&amp; spn.equals(onss);

        String simNumeric = SystemProperties.get(PROPERTY_ICC_OPERATOR_NUMERIC, "");
        String operatorNumeric = s.getOperatorNumeric();

        boolean equalsMcc = true;
        try {
            equalsMcc = simNumeric.substring(0, 3).
                    equals(operatorNumeric.substring(0, 3));
        } catch (Exception e){
        }

        return gsmRoaming &amp;&amp; !(equalsMcc &amp;&amp; (equalsOnsl || equalsOnss));
    }</pre>
<p>Okay, let me summarize what this piece of code does wrong, at least from my understanding:</p>
<ul>
<li>It takes both the network operator alphanumeric identifier and alphanumeric long identifier and compares both to the alphanumeric identifier coming from the SIM card, whilst&#8230;</li>
<li>&#8230; it could simply use the network and SIM card numeric identifiers and compare those, which should be a lot cheaper than comparing those strings</li>
<li>Then it takes the first three characters/digits of the numeric identifiers (which indicate the country) and compares those</li>
</ul>
<p>Now in my case my SIM card doesn&#8217;t seem to provide the phone with a alphanumeric identifier, so the first two comparisons always fail for obvious reasons and, looking at the inline-if in the last line of that method my phone will always indicate that I am in roaming mode, even when I am not.</p>
<p>The problem is not only the logic which seems to be wrong, but I rather see the inefficient comparisons used there to be a major problem in embedded systems like mobile phones. This is the first piece of Android code I have had a look at, but if all other code is as ugly and inefficient as these few lines Android really needs some major fixes. Related to this I have reported bug <a href="http://code.google.com/p/android/issues/detail?id=4590">#4590</a> and forked the <a href="http://github.com/speijnik/android_frameworks_base">git repository in question</a> over at github, to fix this method, should be a matter of 5 minutes.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.peijnik.at/2009/11/08/androids-roaming-detection-its-implementation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android, Mythbusters and openness</title>
		<link>http://blog.peijnik.at/2009/11/08/android-mythbusters-and-openness/</link>
		<comments>http://blog.peijnik.at/2009/11/08/android-mythbusters-and-openness/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 03:49:41 +0000</pubDate>
		<dc:creator>stephan</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[foss]]></category>
		<category><![CDATA[free software]]></category>
		<category><![CDATA[gsoc]]></category>
		<category><![CDATA[personal]]></category>

		<guid isPermaLink="false">http://blog.peijnik.at/?p=170</guid>
		<description><![CDATA[I have been reading a great many posts about Android lately, some consisting of criticism, some of praise and some simply addressing issues in the Android &#8220;community&#8221;. Let&#8217;s have a look at those.
Matt Porter&#8217;s Android Mythbusters presentation and Harald Welte&#8217;s reaction

I haven&#8217;t seen the presentation live, but I had a look at the slides. Impressing [...]]]></description>
			<content:encoded><![CDATA[<p>I have been reading a great many posts about Android lately, some consisting of criticism, some of praise and some simply addressing issues in the Android &#8220;community&#8221;. Let&#8217;s have a look at those.</p>
<p><strong>Matt Porter&#8217;s </strong><strong>Android Mythbusters presentation</strong><strong> and Harald Welte&#8217;s reaction<br />
</strong></p>
<p>I haven&#8217;t seen the presentation live, but I had a look at <a title="Mythbusters_Android.pdf @ tree.celinux.org" href="http://tree.celinuxforum.org/CelfPubWiki/ELCEurope2009Presentations?action=AttachFile&amp;do=get&amp;target=Mythbusters_Android.pdf">the slides</a>. Impressing work done by Matt putting all this information together. However, we all knew that Android only (ab-)uses Linux, without making use of the GNU userland for a long time, didn&#8217;t we?</p>
<p>In his presentation Matt has shown things such as Android&#8217;s udev &#8220;replacement&#8221; that uses hardcoded values for device node creation and (on his <a title="Android Mythbusters (Matt Porter) comment @ laforge.gnumonks.org" href="http://laforge.gnumonks.org/weblog/2009/11/04/#20091104-android_mythbusters">blog</a>) Harald has then come up with a statement I have found to be very strong:</p>
<blockquote><p>The presentation shows how Google has simply thrown 5-10 years of Linux userspace evolution into the trashcan and re-implemented it partially for no reason.  Things like hard-coded device lists/permissions in object code rather than config files, the lack of support for hot-plugging devices (udev), the lack of kernel headers.  A libc that throws away System V IPC that every unix/Linux software developer takes for granted. The lack of complete POSIX threads.  I could continue this list, but hey, you should read those slides. now!</p></blockquote>
<p>Now both of these statements target technical details, but the root of the problem seems to be elsewhere.</p>
<p><strong>Where is my Android 2.0?</strong></p>
<p>Okay, that heading might not be making any sense in the context of this post at a first glance, but let me elaborate on that. Google and the Open Handset Alliance refer to Android as being an &#8220;Open Source&#8221; operating system, but the project is different from &#8220;real&#8221; Free Software projects: development takes place in a closed group and the results are shared with the community later on, when they are deemed to be ready.</p>
<p>This means that innovation also takes place behind closed curtains and that the community is not involved in the actual development process at all. Lately we have seen the result of that, as Motorola is bragging about working close with Google on Android 2.0 (&#8221;Eclair&#8221;), but the AOSP source trees, open for everyone to have a look at, show no signs of version 2.0. In fact no changes that might even remotely suggest the release of a new major version have been made public in the past few weeks. So where is the openess there?<br />
Actually, the Motorola Droid has already shipped with Eclair on 6th, but still, there is no indication that Eclair will be made available to the broader public.</p>
<p>In short Android seems to be developed behind closed curtains, with hardly (read no) community input whatsoever and is sometimes released as Free Software, not what I would describe as an open development process.</p>
<p><strong>The Android Market problem</strong></p>
<p>As we have seen in the past Google is enforcing their copyright on proprietary applications that ship with pretty much every Android device, such as the Android Market. This has become really clear when Steve Kondik received  a cease and desist letter when packing the Google-proprietary applications into his ROMs. Okay, it&#8217;s Google&#8217;s right to enforce their copyright and there is nothing wrong with actually doing so, the thing I really have a problem with is something else: the Market is proprietary.</p>
<p>Now what this means should become rather clear. You can have an Android device without Google&#8217;s proprietary bits, but with default settings you just do not have any way of installing additional software. In my opinion the Market should be freed by Google themselves, or the community has to react and come up with a free replacement to overcome the vendor lock-in. Oh, you might know a replacement called <a href="http://www.slideme.org">SlideMe</a> (or Mobentoo) already. Well, that bugger is proprietary too, so not a solution at all.</p>
<p><strong>Nokia and Maemo to the rescue</strong></p>
<p>In most discussions about the openness of Android someone throws in Nokia and <a href="http://www.maemo.org">Maemo</a>, as a solution to the dilemma. Reading all those positive comments I simply had to give it a try, but all my hopes were destroyed within a few minutes.</p>
<p>Let&#8217;s start with the good news and let alone the reason why my hopes were destroyed for another minute or two. Maemo is based on Debian GNU/Linux and various Free Software components, such as GTK+, gstreamer, esd and friends. Most of the system is Free Software which is a good thing(tm) and reading all of this really got me into Maemo. Okay, some applications seem to be proprietary, but I am sure that could be fixed rather easily, so I could once for all use a truly open phone.</p>
<p>&#8230;and then came the <a href="http://repository.maemo.org/stable/fremantle/maemo-sdk-install_5.0.sh">SDK installer shell script</a>:</p>
<blockquote><p>#!/bin/sh<br />
# Copyright (C) 2006-2009 Nokia Corporation<br />
#<br />
# This is proprietary software owned by Nokia Corporation.<br />
#<br />
# Contact: Maemo Integration &lt;integration@maemo.org&gt;<br />
# Version: $Revision: 1110 $</p></blockquote>
<p>Now there is one question you should ask yourself: Why would someone trying to promote his platform as being open make the *installer* script for its SDK proprietary? Come on, it&#8217;s an installer script, how much of your secret juice could be in there? What&#8217;s the problem with people modifying it and working on this installer script in an open development environment?</p>
<p>I had high hopes for Nokia actually doing a bit better than Google, but it seems they&#8217;ve failed to do so. It may be me overreacting, but a proprietary SDK installer shell script scares me enough not to install the SDK and have a look at it for now nor to think about buying a Maemo-based device in the near future. Please Nokia, either get the facts straight or provide us with a free SDK to your free &amp; open platform.</p>
<p>So, in short, Google is bad at working with the community and creating a truly open development process, and Nokia simply fails in terms of not scaring off prospective developers for their open platform with the proprietary SDK installer. Do you have any solutions in terms of an open phone environment, apart from what OpenMoko has come up with?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.peijnik.at/2009/11/08/android-mythbusters-and-openness/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>How to move panels in Gnome 2.28</title>
		<link>http://blog.peijnik.at/2009/11/04/how-to-move-panels-in-gnome-2-28/</link>
		<comments>http://blog.peijnik.at/2009/11/04/how-to-move-panels-in-gnome-2-28/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 09:04:07 +0000</pubDate>
		<dc:creator>stephan</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[foss]]></category>
		<category><![CDATA[free software]]></category>
		<category><![CDATA[gsoc]]></category>
		<category><![CDATA[observations]]></category>

		<guid isPermaLink="false">http://blog.peijnik.at/?p=162</guid>
		<description><![CDATA[I just installed Ubuntu Karmic Koala on my workstation and came across the problem of not being able to move/drag Gnome panels around in order to have the panels on my primary monitor.
On the Debian system that was powering the workstation before this was a non-issue as I could simply click, hold and drag both [...]]]></description>
			<content:encoded><![CDATA[<p>I just installed Ubuntu Karmic Koala on my workstation and came across the problem of not being able to move/drag Gnome panels around in order to have the panels on my primary monitor.<br />
On the Debian system that was powering the workstation before this was a non-issue as I could simply click, hold and drag both the upper and the lower panel, but this didn&#8217;t work.</p>
<p>So, after a few minutes of googling I came across an entry at answers.launchpad.net[0] and a blog post, but I cannot seem to remember the URL to that one. I can imagine that some of you might be having the exact same problem, so the solution is holding down the ALT, whilst dragging as usual.</p>
<p>[0] <a href="https://answers.launchpad.net/ubuntu/+source/gnome-panel/+question/264">https://answers.launchpad.net/ubuntu/+source/gnome-panel/+question/264</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.peijnik.at/2009/11/04/how-to-move-panels-in-gnome-2-28/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python everywhere: computer games</title>
		<link>http://blog.peijnik.at/2009/04/02/python-everywhere-computer-games/</link>
		<comments>http://blog.peijnik.at/2009/04/02/python-everywhere-computer-games/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 16:35:44 +0000</pubDate>
		<dc:creator>stephan</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[everywhere]]></category>
		<category><![CDATA[foss]]></category>

		<guid isPermaLink="false">http://blog.peijnik.at/?p=92</guid>
		<description><![CDATA[This is the second article in my series Python everywhere and covers the use of Python for in computer games. The first article of this series covered the use of Python for the conficker worm scanner tool and can be found here.
Games written in Python
As PyGame provides a nice library for writing games purely in [...]]]></description>
			<content:encoded><![CDATA[<p>This is the second article in my series Python everywhere and covers the use of Python for in computer games. The first article of this series covered the use of Python for the conficker worm scanner tool and can be found <a title="Python everywhere: conficker scanner" href="http://blog.peijnik.at/2009/03/31/python-everywhere-conficker-scanner/">here</a>.<br />
<span id="more-92"></span><strong>Games written in Python</strong></p>
<p>As <a title="pygame.org" href="http://www.pygame.org/">PyGame</a> provides a nice library for writing games purely in Python it is becoming more common to use Python for this task too. The book &#8220;<a title="Beginning Game Development with Python and Pygame  @ apress.com" href="http://www.apress.com/book/view/9781590598726">Beginning Game Development with Python and Pygame</a>&#8221; is linked directly from the PyGame homepage, and thus is probably a good resource if you want to start writing games in Python.</p>
<p>However, I do not want to go into detail on how this library works, but rather provide you with a few examples of games written in Python. To provide you with a few examples I had a look at the <a title="pyweek.org" href="http://www.pyweek.org/">PyWeek</a> homepage. PyWeek is a Python Game Programming Challenge which invites everyone to participate, so the winners of this contest are of high-quality, and I&#8217;m showing you the latest two winners.</p>
<p>There are always two winners of PyWeek in for indivduals who have created games and teams. The latest winners are &#8220;<a title="Team Rambo @ pyweek.org" href="http://www.pyweek.org/e/Rambo/">Team Rambo</a>&#8221; in the individual effort category and &#8220;<a title="Midnight Sun @ pyweek.org" href="http://www.pyweek.org/e/midnightsun/">Midnight Sun</a>&#8221; with their two-man team.</p>
<p><strong>PyWeek: Team Rambo&#8217;s Stringrolled (individual)</strong></p>
<p style="text-align: left;">Stringrolled makes use of the pygame library I mentioned earlier and is a <a title="Platform game @ en.wikipedia.org" href="http://en.wikipedia.org/wiki/Platform_game">platform game</a>. In a mere 2377 lines of code, including comments and blank lines, Team Rambo created an impressive game, coming with a story, easy-to-learn controls and nice 2D-graphics, screenshot below. <a href="http://media.pyweek.org/dl/7/Rambo/pyweek3.png"><img class="aligncenter" title="Screenshot of Stringrolled" src="http://media.pyweek.org/dl/7/Rambo/pyweek3.png" alt="Stringrolled screenshot @ media.pyweek.org" width="384" height="240" /></a></p>
<p style="text-align: left;"><strong>PyWeek: Midnight Sun&#8217;s Kite Story</strong></p>
<p style="text-align: left;">Kite Story is yet another interesting game, with game mechanics I have not seen ever before. You are controlling a kite with your mouse and are trying to catch objects, such as bees and birds, with the kite&#8217;s rope. So what you basically do you draw a loop around an object with<a href="http://media.pyweek.org/dl/7/midnightsun/ss2.png"><img class="alignleft" title="Kite Story: catching a sky diver" src="http://media.pyweek.org/dl/7/midnightsun/ss2.png" alt="Kite Story screenshot @ media.pyweek.org" width="357" height="359" /></a> your mouse and that way catch it. Every third cought object you advance to the next level, but keep in mind not to collide with the objects, because you will lose them and in turn be doing the previous level again, screenshot below. It should be noted that this game does not make use of PyGame at all, but rather relies on <a title="pyglet.org" href="http://pyglet.org/">pyglet</a>, and is 1997 lines of code in length, again counting blank lines and comments too.</p>
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;"><strong>Games using Python</strong></p>
<p style="text-align: left;">You have seen now that it is possible to write a game completely in Python, but there&#8217;s another use-case of Python in games: scripting.<br />
Some (proprietary) games, such as <a title="Modding Sid Meier's Civilization IV @ 2kgames.com" href="http://www.2kgames.com/civ4/blog_03.htm">Civilization IV</a>, offer Python support in their editors and SDKs. This quote from the article at 2kgames.com should give you a good idea of what can be done using Python in Civilization IV:</p>
<blockquote>
<p style="text-align: left;">The next level offers <strong>Python and XML</strong> support, letting modders with more experience manipulate the game world and everything in it. XML (eXtensible Markup Language) files can be edited in standard text editors or in special XML file editors that have ease-of-use features like a grid view. Editing these files will allow players to tweak simple game rules and change or add content. For instance, they can add new unit or building types, change the cost of wonders, or add new civilizations. Players can also change the sounds played at certain times or edit the play list for your soundtrack. NOTE: You can have custom soundtracks simply by adding music to the custom folder. You only need to edit the XML in order to assign certain pieces to specific eras or remove certain pieces.</p>
</blockquote>
<blockquote><p>The Python scripting language is fully integrated throughout the game and offers experienced modders a chance to really strut their stuff! People with some programming skills will be able to do things to alter the game in interesting and extraordinary ways. For instance, all of the game interface screens are exposed to Python, so modders will be able to change the information that&#8217;s displayed, as well as how it&#8217;s positioned on the screen. We also use Python to create and generate all of the random map scripts that are included in the game. So, players will now have the ability to add scripted events to the game like automatically generating units when a tile is reached, having specific situations trigger automatic war, or get this, bringing back Civil Wars caused by unrest, Civ II style!</p></blockquote>
<p><a title="EVE Online Homepage" href="http://www.eveonline.com/">EVE Online</a> is another game making use of Python, as an <a title="stackless python 2.5 @ eveonline.com" href="http://www.eveonline.com/devblog.asp?a=blog&amp;bid=488">article</a> over at eveonline.com points out.</p>
<p><strong>Python everywhere &#8211; also in compuater games</strong></p>
<p>Even though I am sure you can come up with a lot more examples of Python being used in computer games I think I have proven my point. Python is being used not only to create computer games, but sometimes also to provide developers with a way of extending games. To me personally it feels as if adoption of Python for this very task is increasing too, and I expect Python to be used even more by the game development community in the future.</p>
<p>You can expect the third part of this series to be released in about a week, so please check back regularly if you like the series.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.peijnik.at/2009/04/02/python-everywhere-computer-games/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Problems running PHP as a separate FastCGI process</title>
		<link>http://blog.peijnik.at/2009/04/01/running-php-as-a-separate-fastcgi-process/</link>
		<comments>http://blog.peijnik.at/2009/04/01/running-php-as-a-separate-fastcgi-process/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 11:06:35 +0000</pubDate>
		<dc:creator>stephan</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[observations]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://blog.peijnik.at/?p=106</guid>
		<description><![CDATA[As some of you might have noticed this webserver has not been that responsive in the past few hours and I have been working hard on getting that fixed. I finally identified the problem and was able to fix it.
The root of the problem was my setup running PHP as a separate FastCGI process. Unfortunatly [...]]]></description>
			<content:encoded><![CDATA[<p>As some of you might have noticed this webserver has not been that responsive in the past few hours and I have been working hard on getting that fixed. I finally identified the problem and was able to fix it.</p>
<p>The root of the problem was my setup running PHP as a separate FastCGI process. Unfortunatly it seems as if PHP can only handle 500 requests per FastCGI process and then seems to lock up.<br />
The old setup of this site didn&#8217;t cause such problems and it seems the problem lies in not setting the <em>PHP_FCGI_CHILDREN</em> and <em>PHP_FCGI_MAX_REQUESTS</em> environment variables with the new setup.</p>
<p><span id="more-106"></span></p>
<p>I initially thought that the default values of those environment variables were safe, but they are not. As I already wrote PHP seems to lock up after 500 requests and the solution lies in changing <em>PHP_FCGI_CHILDREN</em>, which defaults to 0 (no additional processes) to something bigger than 0 (I am using 2 children to make sure I have at least one PHP process reading for answering requests at any time).<br />
Why? Quite simple, if you increase the value the PHP root process becomes some sort of manager and delegates requests to the children, as expected. However, using <em>PHP_FCGI_MAX_REQUESTS</em> it only forwards the specified number of requests to a child process before killing it and starting a new one. <strong>Problem solved</strong>.</p>
<p>Information on this behaviour can not be found in the PHP online manual, but rather at <a title="README.FastCGI @ lxr.php.net" href="http://lxr.php.net/source/php-src/sapi/cgi/README.FastCGI">http://lxr.php.net/source/php-src/sapi/cgi/README.FastCGI</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.peijnik.at/2009/04/01/running-php-as-a-separate-fastcgi-process/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python everywhere: conficker scanner</title>
		<link>http://blog.peijnik.at/2009/03/31/python-everywhere-conficker-scanner/</link>
		<comments>http://blog.peijnik.at/2009/03/31/python-everywhere-conficker-scanner/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 11:30:23 +0000</pubDate>
		<dc:creator>stephan</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[everywhere]]></category>
		<category><![CDATA[foss]]></category>

		<guid isPermaLink="false">http://blog.peijnik.at/?p=87</guid>
		<description><![CDATA[This article is the first in my new series &#8220;Python everywhere&#8221;.
As this is the first article in this series I would like to explain what the series is all about.
As an avid Python user and developer I want to share my observations whenever I find Python applications doing not-so-unusual things, Python applications running on embedded [...]]]></description>
			<content:encoded><![CDATA[<p>This article is the first in my new series &#8220;Python everywhere&#8221;.</p>
<p>As this is the first article in this series I would like to explain what the series is all about.<br />
As an avid Python user and developer I want to share my observations whenever I find Python applications doing not-so-unusual things, Python applications running on embedded devices. In the end I want to point out just what the name of this series suggests: Python is everywhere and can be used for everything.</p>
<p>So, straight ahead to the first issue: the conficker scanner.</p>
<p><span id="more-87"></span>When reading an article about a detection mechanism for the conficker worm on <a title="Deutsche Forscher entwickeln Netzwerk-Scan für Conficker-Wurm @ heise.de" href="http://www.heise.de/security/Deutsche-Forscher-entwickeln-Netzwerk-Scan-fuer-Conficker-Wurm--/news/meldung/135434">heise Security</a> [german] I was myself wondering a few things, but wanted to give it a try. So I followed the link to the article <a title="Detecting Conficker @ honeynet.org" href="http://honeynet.org/node/388">Detecting Conficker</a>, by <a title="Werner Tillmann\s blog @ honeynet.org" href="http://honeynet.org/blog/9">Tillmann Werner</a>. Before clicking the link I was wondering whether I could get this tool running on GNU/Linux using wine, or another method.</p>
<p>After downloading the ZIP file and unpacking it I thought I was dreaming. There were two Python files, along with a <em>COPYING</em> file.<br />
So, even though before having a look at the code I wanted to know the COPYING conditions, and again I saw something unexpected: it&#8217;s licensed under the <strong>GPLv3</strong>, great!</p>
<p>As there are some computers running a proprietary operating system from Redmond on this network I immediately gave it a shot. I started the script (<em>scs.py</em>), and after fulfilling its requirements (namely the <em>impacket</em> Python module) I ran it on the local network and it worked without any problems. No conficker found on this network, after all my flatmates have their systems secured &#8211; good.</p>
<p>So there you have another use-case for Python: detecting malware over the network.<br />
Kudos should go to Tillmann Werner, not only for this piece of Python code, but also for his work on the <a title="honeynet project (honeynet.org)" href="http://honeynet.org/">honeynet project</a> and, together with Felix Leder, the great <a title="Know Your Enemy: Containing Conficker paper @ honeynet.org" href="https://www.honeynet.org/papers/conficker">analysis</a> of conficker. Keep up the good work, and thanks for proving Python can also be used for this task.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.peijnik.at/2009/03/31/python-everywhere-conficker-scanner/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing pyttpd</title>
		<link>http://blog.peijnik.at/2009/03/31/introducing-pyttpd/</link>
		<comments>http://blog.peijnik.at/2009/03/31/introducing-pyttpd/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 23:27:07 +0000</pubDate>
		<dc:creator>stephan</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[foss]]></category>
		<category><![CDATA[free software]]></category>
		<category><![CDATA[pyttpd]]></category>

		<guid isPermaLink="false">http://blog.peijnik.at/?p=85</guid>
		<description><![CDATA[In this article I would like to inform you about my newest pet-project: pyttpd.
pyttpd is my effort of implementing a webserver in Python, with a focus on security (through privilege separation), extensibility and scalability.
I started this project because I was not entirely happy with the lack of flexibility and support for privilege separation by popular [...]]]></description>
			<content:encoded><![CDATA[<p>In this article I would like to inform you about my newest pet-project: <a title="pyttpd project @ code.sp-its.at" href="http://code.sp-its.at/projects/pyttpd">pyttpd</a>.</p>
<p>pyttpd is my effort of implementing a webserver in Python, with a focus on security (through privilege separation), extensibility and scalability.</p>
<p>I started this project because I was not entirely happy with the lack of flexibility and support for privilege separation by popular webservers. Whilst both <a title="lighttpd.net" href="http://lighttpd.net">lighttpd</a> and <a title="httpd.apache.org" href="http://httpd.apache.org">Apache httpd</a> provide means of running processes under different users these usually require hacks like <a title="suexec (apache 2.0 documentation)" href="http://httpd.apache.org/docs/2.0/suexec.html">suexec</a>. Additionally I am somehow curious about how a fully-fledged webserver implemented in Python would perform compared to the mentioned daemons.</p>
<p><span id="more-85"></span></p>
<p><strong>Security through extensive use of Privilege Separation</strong></p>
<p>Whilst it is common for daemons to initially run as a privileged user and drop privileges as soon as possible it is possible to make more extensive use of setuid and friends.<br />
pyttpd&#8217;s design aims at creating one <a title="pmaster (pyttpd documentation)" href="http://code.sp-its.at/doc/pyttpd/tip/concepts/process_layout.html#privileged-master-process-pmaster">privileged process</a>, which only binds to privileged ports and spawns subprocesses.<br />
All subprocesses have specific tasks, such as routing <a title="umaster (pyttpd documentation)" href="http://code.sp-its.at/doc/pyttpd/tip/concepts/process_layout.html#unprivileged-master-process-umaster">between all processes</a>, <a title="listener process (pyttpd documentation)" href="http://code.sp-its.at/doc/pyttpd/tip/concepts/process_layout.html#id1">protocol-specific parsing</a> of incoming requests and handling <a title="vhost process (pyttpd documentation)" href="http://code.sp-its.at/doc/pyttpd/tip/concepts/process_layout.html#id2">processing</a> of those requests.<br />
The point is that all these processes do not run as &#8220;<em>www-data</em>&#8221; or another common account, but that a logic separation takes place on a per-host basis. This means that if the webserver is hosting <em>www.example.org</em> and <em>webapp.example.org</em> those will be running under different system accounts, making it hard to interfere with each other. This method should also enable the use of <a title="Mandatory Access Control @ en.wikipedia.org" href="http://en.wikipedia.org/wiki/Mandatory_access_control">MAC</a> mechanisms such as <a title="SELinux @ en.wikipedia.org" href="http://en.wikipedia.org/wiki/SELinux">SELinux</a> or <a title="SMACK @ en.wikipedia.org" href="http://en.wikipedia.org/wiki/Simplified_Mandatory_Access_Control_Kernel">SMACK</a> more efficiently.</p>
<p>The design choice of having separate processes for each vhost comes with another benefit: users (or customers) &#8220;owning&#8221; a vhost could potentionally be allowed to modify parts of the vhost&#8217;s configuration (excluding UID, GID, and other security-relevant options) on their own.</p>
<p><strong>Early status</strong></p>
<p>Right now pyttpd is in a very early planning stage, with no code to show yet. I am still in the middle of the process of writing down all ideas that come to my mind, weeding some out and documenting the others.<br />
So what do I have to show you then? Well, the the concept section of the <a title="Concepts (pyttpd documentation)" href="http://code.sp-its.at/doc/pyttpd/tip/concepts">documentation</a> is online now and I am planning on extending it in the next few days and eventually start writing code rather sooner than later.</p>
<p><strong>Your ideas&#8230;</strong></p>
<p>&#8230;and opinions are what I am really interested in. If you are interested in this project I would love if you got involved in some way. Feel free to create tickets at pyttpd&#8217;s <a title="pyttpd project @ code.sp-its.at" href="http://code.sp-its.at/projects/pyttpd">project page</a> if you have an idea you feel is worth adding or if one of my ideas is flawed, create a comment here or send me an <a title="send email to stephan at peijnik dot at" href="mailto:stephan at peijnik dot at">email</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.peijnik.at/2009/03/31/introducing-pyttpd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How using proprietary software can affect system security</title>
		<link>http://blog.peijnik.at/2009/03/29/how-using-proprietary-software-can-affect-system-security/</link>
		<comments>http://blog.peijnik.at/2009/03/29/how-using-proprietary-software-can-affect-system-security/#comments</comments>
		<pubDate>Sun, 29 Mar 2009 10:17:00 +0000</pubDate>
		<dc:creator>stephan</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[foss]]></category>
		<category><![CDATA[free software]]></category>
		<category><![CDATA[observations]]></category>

		<guid isPermaLink="false">http://blog.peijnik.at/?p=66</guid>
		<description><![CDATA[There has been a lot of discussion on whether Free Software is more secure than proprietary software, but I have an additional argument that shows how the use of Free Software can improve system security.
Now you probably expect me to come up with a pure technical reason showing superiority of Free Software, but I am [...]]]></description>
			<content:encoded><![CDATA[<p>There has been a lot of discussion on whether Free Software is more secure than proprietary software, but I have an additional argument that shows how the use of Free Software can improve system security.</p>
<p>Now you probably expect me to come up with a pure technical reason showing superiority of Free Software, but I am taking another path this time: let&#8217;s talk about user trust.</p>
<p><span id="more-66"></span></p>
<p><strong>Software updates on pure Free Software operating systems</strong></p>
<p>Firstly, let&#8217;s take a look at how security updates are deployed on pure Free Software operating systems.<br />
All major GNU/Linux and *BSD distributions come with built-in update systems for all Free Software packages provided by the distribution. Once a security update to any piece of software is released you will get a notification saying updates are available and that you should install them and after doing so your system should be in a quite secure state.</p>
<p><strong>Updater-applications of proprietary software</strong></p>
<p>Okay, proprietary software does often come with its own update mechanisms, giving you pretty much the same functionality. But here is my point: users tend to block these updater-applications from accessing the network with personal firewalls and similar tools, which basically disables the updater and most likely will cause the system to be more vulnerable rather sooner than later.</p>
<p><strong>But why do people even consider blocking an updater-application? </strong></p>
<p>When I asked people why they blocked these applications a lot of reasons came up, but it usually boils down to lack of trust for proprietary software vendors. People seem not to trust software vendors for a variety of reasons. The most common reasons seem to be that they are either worried about the disclosure of private information or the lack of a license for a piece of software, combined with the first reason.</p>
<p>So people actually seem to be scared by what a piece proprietary software could do, and when not having their software licensed people seem to be even more scared. When I ask people why they are running these programs, even though they do not trust their vendors they usually shrug and I get replies that can be summed up as &#8220;it just works&#8221;, &#8220;but I don&#8217;t have a choice&#8221; and &#8220;I am used to software X&#8221;.</p>
<p><strong>The solution is Free Software</strong></p>
<p>Free Software can be a solution to all these problems. The most important thing people should be aware of that they do not have to fear Free Software vendors. After all, when using Free Software you do have a valid license and you can, at least in theory, check exactly a program is doing to your system. Also, if you are not capable of doing such checks yourself, you can rest assured that other people are doing such checks and give back to the project in question, improving your favorite Free Software applications.</p>
<p>Free Software is a choice, and there is hardly any proprietary piece of software which cannot be replaced by a free equivalent. Free Software is my first choice, not only for me but for my family too, with great results so far.</p>
<p><em>Rest assured you can trust in what your software is doing, free yourself today</em> &#8211; <strong>use Free Software</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.peijnik.at/2009/03/29/how-using-proprietary-software-can-affect-system-security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How Email encryption for the broader public could be realized</title>
		<link>http://blog.peijnik.at/2008/10/16/how-email-encryption-for-the-broader-public-could-be-realized/</link>
		<comments>http://blog.peijnik.at/2008/10/16/how-email-encryption-for-the-broader-public-could-be-realized/#comments</comments>
		<pubDate>Thu, 16 Oct 2008 09:27:44 +0000</pubDate>
		<dc:creator>stephan</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://espi86.wordpress.com/?p=49</guid>
		<description><![CDATA[After reading the Every Email In UK To Be Monitored article and its comments over at Slashdot I once again felt like encrypting each and every Email I send using GPG/PGP. Now for this encryption to work the person I am sending a message to would need to have GPG/PGP set up too. A lot [...]]]></description>
			<content:encoded><![CDATA[<p>After reading the <a title="Every EMail In UK To Be Monitored" href="http://yro.slashdot.org/yro/08/10/15/2222209.shtml">Every Email In UK To Be Monitored</a> article and its comments over at <a title="News for nerds, stuff that matters" href="http://slashdot.org">Slashdot</a> I once again felt like encrypting each and every Email I send using GPG/PGP. Now for this encryption to work the person I am sending a message to would need to have GPG/PGP set up too. A lot of technical-minded people already have this set up, but I can not expect everyone to be using encryption.</p>
<p>The reason for not everyone using GPG/PGP for encrypting their emails might be that, even though GPG/PGP have become a lot more usable for the end-user in the last few years, these programs are probably still too technical and thus hard to understand for non-technical users.</p>
<p>This is when I thought a little about how people could be made using public key encryption for E-Mails. After a bit of brain-storming an idea came to my mind, an idea I would like to present you with.</p>
<p><strong>Basic idea</strong></p>
<p>What about creating a program acting as both SMTP and POP3/IMAP proxy server that included all the logic to do encryption and would encrypt/decrypt messages transparently?<br />
If this logic was moved out of Email clients we could get a solution working universally for each and every Email client out there.<br />
<span id="more-49"></span></p>
<p><strong>How this could work</strong></p>
<p>Imagine you sending an email to someone you&#8217;ve never sent an email to. You write the message in your Email client as you are used to and hit the send button. Now, instead of connecting to your SMTP server the E-Mail client would connect to the Email proxy program and submit the message there.</p>
<p>At this point the program would check the email sender and recipient. If the sender does have a public/private key pair and the recipient&#8217;s public key is known the program would prompt you for the passphrase to your encryption key. After entering the passphrase and hitting a button (send, sign, encrypt, I guess you can think of a more appropriate name) again the message would be encrypted and then forwarded to your SMTP server.</p>
<p>On the other hand, if the public key of the recipient is not known (and cannot be fetched off key servers) the program could send a message informing the recipient that you wanted to encrypt your email, but were unable to do so, explain that this program exists, where to get it from, how to set it up, why encryption is important, and so on. I can imagine having a hard-fail mode, sending only this message and a soft-fail mode, attaching or including the automatically generated message somehow (attach it, inline it, etc.) to the original message. Either way, the generated message should be cryptographically signed.</p>
<p>Receiving mail would work the other way around. The proxy would try to fetch messages off all configured IMAP/POP3 servers on its own, check if they are signed. If a signed message arrives the public key should be, if not already done, be imported into the local keyring. As for encrypted messages this should happen the same way, plus decrypting the message.<br />
The Email client would connect to the IMAP/POP3 proxy server and fetch (the decrypted) messages from it. Both unencrypted and unsigned messages should be marked somehow (think subject re-writing here and maybe adding an X- header). However, no automatic sending of emails should happen when receiving messages as the From header could be forged (spam anyone?).</p>
<p><strong>Features of the program</strong></p>
<p>The program I have in mind should include the following features:</p>
<ul>
<li>GPG key management (creating, distribution to keyservers, etc).</li>
<li>Automatic encryption/decryption and signing/checking signatures.</li>
<li>Non-technical, so everyone can use it.</li>
<li>Support multiple IMAP/POP3 and SMTP servers, so it can act as a central point for storing all Emails a user could receive.</li>
<li>Cross-platform functionality (Java? Python?)</li>
<li>Free Software</li>
</ul>
<p><strong>Plans</strong></p>
<p>I would love to implement this program, but fear that this could be way too much work for a single person. If you are interested in helping with the implementation or simply have any comments feel free to either drop me an email at <a title="Send email to author" href="mailto:blog at sp dot or dot at">blog at sp dot or dot at</a> or use the blog&#8217;s comment function.</p>
<p>I hope I did explain my idea clear enough and did not miss anything.</p>
<p>Happy hacking!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.peijnik.at/2008/10/16/how-email-encryption-for-the-broader-public-could-be-realized/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>EuroparlTV for everyone? No, only for users of proprietary software!</title>
		<link>http://blog.peijnik.at/2008/09/18/europarltv-for-everyone-no-only-for-users-of-proprietary-software/</link>
		<comments>http://blog.peijnik.at/2008/09/18/europarltv-for-everyone-no-only-for-users-of-proprietary-software/#comments</comments>
		<pubDate>Thu, 18 Sep 2008 11:19:55 +0000</pubDate>
		<dc:creator>stephan</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[foss]]></category>
		<category><![CDATA[free software]]></category>

		<guid isPermaLink="false">http://espi86.wordpress.com/?p=44</guid>
		<description><![CDATA[The European Parliament (EP) has just recently started a new service: EuroparlTV. A web-TV service which should give citizens of the European Union (actually everyone around the world)  a way to inform themselves about how the EP works, what it does, and so on.
After I first read these news over at heise (german) I was [...]]]></description>
			<content:encoded><![CDATA[<p>The European Parliament (EP) has just recently started a new service: <a title="EuroparlTV homepage" href="http://www.europarltv.europa.eu/StartPage.aspx">EuroparlTV</a>. A web-TV service which should give citizens of the European Union (actually everyone around the world)  a way to inform themselves about how the EP works, what it does, and so on.</p>
<p>After I first read these news over at <a title="Europäisches Parlament startet Internet-TV" href="http://www.heise.de/newsticker/Europaeisches-Parlament-startet-Internet-TV--/meldung/116144">heise</a> (german) I was impressed, but started to fear that yet again some sort of government has invested in proprietary software and is able to bring its services only to users of such software. Seconds later my fears became reality.</p>
<p>EuroparlTV seems to work only for users of either Adobe&#8217;s proprietary <a title="Adobe Flash" href="http://en.wikipedia.org/wiki/Adobe_Flash">Flash player</a> (via the proprietary Adobe Flash file format) or users of Microsoft&#8217;s <a title="Windows Media Player" href="http://en.wikipedia.org/wiki/Windows_Media_Player">Windows Media Player</a> (via the proprietary <a title="WMV" href="http://en.wikipedia.org/wiki/WMV">WMV</a> file format).</p>
<p>What this means to an open web, that is usable for everyone, should be clear.</p>
<p>Basically this is a service all citizens of the European Union pay for, but some cannot use. Is this really how governments (and the EP is some sort of government) should treat their citizens? Rather not.</p>
<p>On the one hand the European Commission is fighting vendor lock-in and monopoles, but on the other hand it directly helps these vendors by creating such services. Not a smart move in my opinion, neither is it understandable.</p>
<p>What I am asking myself though is why the EP was unable to create such a service, which itself could be quite interesting, without having all users of that service use proprietary software?<br />
Is it so hard to deliver the service in a free (as in freedom), standardized format?<br />
I will let answering these questions to you, but keep in mind that there are alternatives to this whole proprietary mess, like <a title="Ogg" href="http://en.wikipedia.org/wiki/Ogg">Ogg</a>, which are completly free.</p>
<p>Personally I am pretty disappointed by this move. However, I hope that I at least informed people that there is a problem with EuroparlTV.<br />
Putting it simple and short this way the EP does a great deal with helping vendor lock-in whilst fighting the freedom of its own citizens. Even though it should be the other way round.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.peijnik.at/2008/09/18/europarltv-for-everyone-no-only-for-users-of-proprietary-software/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
