<?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</title>
	<atom:link href="http://blog.cryptomilk.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.cryptomilk.org</link>
	<description>a cosmological pedestrian</description>
	<lastBuildDate>Mon, 07 May 2012 11:01:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>CM9 (Android 4.0 ICS) and deep sleep</title>
		<link>http://blog.cryptomilk.org/2012/05/06/cm9-android-4-0-ics-and-deep-sleep/</link>
		<comments>http://blog.cryptomilk.org/2012/05/06/cm9-android-4-0-ics-and-deep-sleep/#comments</comments>
		<pubDate>Sun, 06 May 2012 17:27:16 +0000</pubDate>
		<dc:creator>Andreas Schneider</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[cm9]]></category>
		<category><![CDATA[ics]]></category>

		<guid isPermaLink="false">http://blog.cryptomilk.org/?p=294</guid>
		<description><![CDATA[I&#8217;ve had the problem that the device didn&#8217;t want to switch into deep sleep mode if radio was on. What is deep sleep? To make it simple we break it down. Your device has 3 modes. The fisrst is &#8220;Screen On and Awake&#8221;, &#8220;Awake&#8221; and &#8220;Deep Sleep&#8221;. If you use your device it you&#8217;re in [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had the problem that the device didn&#8217;t want to switch into deep sleep mode if radio was on. What is deep sleep? To make it simple we break it down. Your device has 3 modes. The fisrst is &#8220;Screen On and Awake&#8221;, &#8220;Awake&#8221; and &#8220;Deep Sleep&#8221;. If you use your device it you&#8217;re in the first mode and you need a obviously a lot of battery. The second &#8220;Awake&#8221; means it is doing some background work. Checking for calls, checking Emails, syncing contacts. The last one means it goes for some time into a mode were it uses almost no battery, and this is Deep Sleep. If you don&#8217;t do anything and your phone is in your pocket you want that it is in the Deep Sleep mode most of the time.</p>
<p>My HTC Wildfire S didn&#8217;t want to go into the &#8220;Deep Sleep&#8221; mode at all if radio was turned on. It worked with Airplane mode. I thought this has something todo with RIL but I was wrong. Actually it was a bluetooth wakelock. The wakelock &#8220;msm_serial_hs_dma&#8221; was held all the time. The problem is that the msm7227 platform doesn&#8217;t supports quick switch-on/off of the bluetooth module and you need to deactivate it with an overlay else ICS always tries to trigger it.</p>
<p>So adding</p>
<p><code>&lt;bool name="config_bluetooth_adapter_quick_switch"&gt;false&lt;/bool&gt;</code></p>
<p>to <em>overlay/frameworks/base/core/res/res/values/config.xml</em> fixed the problem and the wakelock was gone.</p>
 <p><a href="http://blog.cryptomilk.org/?flattrss_redirect&amp;id=294&amp;md5=96a862fd52a20c338c93b1be40981a41" title="Flattr" target="_blank"><img src="https://blog.cryptomilk.org/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.cryptomilk.org/2012/05/06/cm9-android-4-0-ics-and-deep-sleep/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=asn&amp;popout=1&amp;url=http%3A%2F%2Fblog.cryptomilk.org%2F2012%2F05%2F06%2Fcm9-android-4-0-ics-and-deep-sleep%2F&amp;language=en_GB&amp;category=text&amp;title=CM9+%28Android+4.0+ICS%29+and+deep+sleep&amp;description=I%26%238217%3Bve+had+the+problem+that+the+device+didn%26%238217%3Bt+want+to+switch+into+deep+sleep+mode+if+radio+was+on.+What+is+deep+sleep%3F+To+make+it+simple+we+break+it...&amp;tags=android%2Ccm9%2Cics%2Cblog" type="text/html" />
	</item>
		<item>
		<title>libhtc_ril.so and segfaults</title>
		<link>http://blog.cryptomilk.org/2012/04/23/libhtc_ril-so-and-segfaults/</link>
		<comments>http://blog.cryptomilk.org/2012/04/23/libhtc_ril-so-and-segfaults/#comments</comments>
		<pubDate>Mon, 23 Apr 2012 16:03:58 +0000</pubDate>
		<dc:creator>Andreas Schneider</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[cm9]]></category>
		<category><![CDATA[marvel]]></category>

		<guid isPermaLink="false">http://blog.cryptomilk.org/?p=290</guid>
		<description><![CDATA[If you try to get a new Android version, in this case CyanogenMod9, working on your old phone you have to deal with binary blobs. One of these blobs is the library talking to the radio, libhtc_ril.so. I wanted to document what I learned about libhtc_ril.so. I&#8217;ve wanted to get the library version matching my [...]]]></description>
			<content:encoded><![CDATA[<p>If you try to get a new Android version, in this case CyanogenMod9, working on your old phone you have to deal with binary blobs. One of these blobs is the library talking to the radio, libhtc_ril.so.</p>
<p>I wanted to document what I learned about libhtc_ril.so. I&#8217;ve wanted to get the library version matching my baseband version working with cm9. This resulted it several segfaults. So I&#8217;ve started to strace the rild process to find what&#8217;s going wrong, which permissions are missing etc. The library doesn&#8217;t check return values so it segfaults. One of these segfaults was a missing kernel interface called usb_function_switch. The file should be in /sys/devices/platform/msm_hsusb/usb_function_switch. I&#8217;ve implemented that function in the kernel and it still segfaulted and I had no idea what to do now. Today I analyzed the RADIO logs and stumpled upon:</p>
<pre dir="ltr">D/RILJ    (  328): [0100]&gt; SCREEN_STATE: false
D/HTC_RIL ( 1360): ril_func_screen_state_notified():called
D/HTC_RIL ( 1360): ril_func_screen_state_notified():Not found 'ether:' in USB_STATE_PATH</pre>
<p>As it segfaulted directly after closing /sys/devices/platform/msm_hsusb/usb_function_switch it smelled like it expeced to have something like:</p>
<pre dir="ltr">ether:disable</pre>
<p>I&#8217;ve dived into the code and found out that in my kernel tree it was called rndis and in the htc kernel tree it was called ether. So I&#8217;ve fixed that and added the other values of /sys/devices/platform/msm_hsusb/usb_function_switch it started to work just fine. I hope this post will help other developers with similar problems.</p>
<p>This is the full set of the usb_function_switch:</p>
<pre dir="ltr">ether:disable
accessory:disable
usb_mass_storage:enable
adb:enable
cdc_ethernet:disable
diag:disable
modem:disable
serial:disable</pre>
 <p><a href="http://blog.cryptomilk.org/?flattrss_redirect&amp;id=290&amp;md5=4f9f90562422e0375b48711039c7cc41" title="Flattr" target="_blank"><img src="https://blog.cryptomilk.org/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.cryptomilk.org/2012/04/23/libhtc_ril-so-and-segfaults/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=asn&amp;popout=1&amp;url=http%3A%2F%2Fblog.cryptomilk.org%2F2012%2F04%2F23%2Flibhtc_ril-so-and-segfaults%2F&amp;language=en_GB&amp;category=text&amp;title=libhtc_ril.so+and+segfaults&amp;description=If+you+try+to+get+a+new+Android+version%2C+in+this+case+CyanogenMod9%2C+working+on+your+old+phone+you+have+to+deal+with+binary+blobs.+One+of+these+blobs+is...&amp;tags=android%2Ccm9%2Cmarvel%2Cblog" type="text/html" />
	</item>
		<item>
		<title>CM9 on Marvel (HTC Wildfire S)</title>
		<link>http://blog.cryptomilk.org/2012/04/12/cm9-on-marvel-htc-wildfire-s/</link>
		<comments>http://blog.cryptomilk.org/2012/04/12/cm9-on-marvel-htc-wildfire-s/#comments</comments>
		<pubDate>Thu, 12 Apr 2012 07:42:32 +0000</pubDate>
		<dc:creator>Andreas Schneider</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.cryptomilk.org/?p=283</guid>
		<description><![CDATA[After Qualcom released new graphic blobs for ARMv6 I was able to get CyanogenMod 9 working on my HTC Wildfire S pretty well. There are still some problem which need to be fixed. GPS isn&#8217;t working, if you have GSM/3G turned on the battery drains pretty fast. I&#8217;m currently trying to get the camera working. [...]]]></description>
			<content:encoded><![CDATA[<p>After Qualcom released new graphic blobs for ARMv6 I was able to get CyanogenMod 9 working on my HTC Wildfire S pretty well. There are still some problem which need to be fixed. GPS isn&#8217;t working, if you have GSM/3G turned on the battery drains pretty fast. I&#8217;m currently trying to get the camera working. There is also a wakelock bug with bluetooth in the kernel right now.</p>
<p>If you&#8217;re a developer working on a msm7x27 device and are interested to work together join #cyanogenmod-msm7x27 @ freenode.</p>
<p>You can find my work at <a href="http://git.cryptomilk.org/">http://git.cryptomilk.org/</a></p>
<p><a href="http://blog.cryptomilk.org/wp-content/uploads/2012/04/IMG_0265_v1.jpg"><img class="alignnone size-medium wp-image-284" title="cm9" src="http://blog.cryptomilk.org/wp-content/uploads/2012/04/IMG_0265_v1-200x300.jpg" alt="" width="200" height="300" /></a></p>
 <p><a href="http://blog.cryptomilk.org/?flattrss_redirect&amp;id=283&amp;md5=64f4cab95e42487c159ac17cb05dfa4c" title="Flattr" target="_blank"><img src="https://blog.cryptomilk.org/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.cryptomilk.org/2012/04/12/cm9-on-marvel-htc-wildfire-s/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=asn&amp;popout=1&amp;url=http%3A%2F%2Fblog.cryptomilk.org%2F2012%2F04%2F12%2Fcm9-on-marvel-htc-wildfire-s%2F&amp;language=en_GB&amp;category=text&amp;title=CM9+on+Marvel+%28HTC+Wildfire+S%29&amp;description=After+Qualcom+released+new+graphic+blobs+for+ARMv6+I+was+able+to+get+CyanogenMod+9+working+on+my+HTC+Wildfire+S+pretty+well.+There+are+still+some+problem+which+need...&amp;tags=blog" type="text/html" />
	</item>
		<item>
		<title>Synchronize two folders on a Mac and other Unix Systems with csync</title>
		<link>http://blog.cryptomilk.org/2012/03/21/synchronize-two-folders-on-a-mac-and-other-unix-systems-with-csync/</link>
		<comments>http://blog.cryptomilk.org/2012/03/21/synchronize-two-folders-on-a-mac-and-other-unix-systems-with-csync/#comments</comments>
		<pubDate>Wed, 21 Mar 2012 11:27:23 +0000</pubDate>
		<dc:creator>Andreas Schneider</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[csync]]></category>
		<category><![CDATA[file synchronization]]></category>

		<guid isPermaLink="false">http://blog.cryptomilk.org/?p=276</guid>
		<description><![CDATA[I&#8217;ll show you how to to synchronise files of two different directories in a terminal using a mighty automator. The tool is called csync and is a client side file synchronizer. Unless like rsync it syncs in two directions so that the contents are equal as soon as it finished. Here is the simple example [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ll show you how to to synchronise files of two different directories in a terminal using a mighty automator. The tool is called csync and is a client side file synchronizer. Unless like rsync it syncs in two directions so that the contents are equal as soon as it finished.</p>
<p>Here is the simple example of syncing two folders from terminal:</p>
<p><code>csync /path/to/folder1 /path/to/folder2</code></p>
<p>If you run it the first time, this line compares the both directories and copies the files missing in each other directory to the opposite side. So in the end they are equal. If you delete a file in folder1 it and run it again, csync will notice that the file has been deleted in folder1 and will delete it in folder2. If you create a new file in folder2 and run csync, it will copy the new file to folder2. If a file has changed it will detect it and copy the file to the other folder. If a file has been changed on both sides, the newer file wins.</p>
<p>The options are pretty simple and don&#8217;t need further documentation here. The only interesting option is an additional exclude list. The default one can be found in &#8216;~/.csync/csync_exclude.conf&#8217;.</p>
<p>You can always check the manual of Rsync by typing &#8220;man csync&#8221; in terminal.</p>
<p>The current stable version supports the SMB (Windows sharing) protocol and SFTP.</p>
<p>If you want to synchronize a local folder with a folder on another unix machine you can use the following command:</p>
<p><code>csync /path/to/my/music/collection sftp://my.notebook/home/me/my/music/collection</code></p>
<p>and it will do the same as stated above, but over a sftp network connection. SFTP is the file transfer protocol which is based on SSH and every Unix machine has it normally enabled by default.</p>
<p>We are currently improving csync and adding support for <a href="http://www.ownlcoud.org/">OwnCloud</a>. A graphical Qt based frontend for csync is <a href="https://github.com/dmacvicar/mirall">mirall</a>.</p>
<p>This post is inspired by <a title="this one" href="http://www.bananica.com/Geek-Stuff/Synchronize-two-folders-on-a-Mac-with-Rsync/">this one</a> <img src='http://blog.cryptomilk.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
 <p><a href="http://blog.cryptomilk.org/?flattrss_redirect&amp;id=276&amp;md5=e2a420e9980569aaa3cc4bef3275291d" title="Flattr" target="_blank"><img src="https://blog.cryptomilk.org/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.cryptomilk.org/2012/03/21/synchronize-two-folders-on-a-mac-and-other-unix-systems-with-csync/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=asn&amp;popout=1&amp;url=http%3A%2F%2Fblog.cryptomilk.org%2F2012%2F03%2F21%2Fsynchronize-two-folders-on-a-mac-and-other-unix-systems-with-csync%2F&amp;language=en_GB&amp;category=text&amp;title=Synchronize+two+folders+on+a+Mac+and+other+Unix+Systems+with+csync&amp;description=I%26%238217%3Bll+show+you+how+to+to+synchronise+files+of+two+different+directories+in+a+terminal+using+a+mighty+automator.+The+tool+is+called+csync+and+is+a+client+side+file...&amp;tags=csync%2Cfile+synchronization%2Cblog" type="text/html" />
	</item>
		<item>
		<title>CyanogenMod 9 for HTC Wildfire S</title>
		<link>http://blog.cryptomilk.org/2012/01/23/cyanogenmod-9-for-htc-wildfire-s/</link>
		<comments>http://blog.cryptomilk.org/2012/01/23/cyanogenmod-9-for-htc-wildfire-s/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 08:37:17 +0000</pubDate>
		<dc:creator>Andreas Schneider</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.cryptomilk.org/?p=268</guid>
		<description><![CDATA[I&#8217;ve got a new gadget, a nice and small Android based smartphone, the HTC Wildfire S (WFS). The week before I got it alquez finished porting CyanogenMod 7 to the wfs. I&#8217;ve installed it and started to use it. After some time I was curios how to build the system. I&#8217;ve asked alquez how to [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve got a new gadget, a nice and small Android based smartphone, the HTC Wildfire S (WFS). The week before I got it alquez finished porting CyanogenMod 7 to the wfs. I&#8217;ve installed it and started to use it. After some time I was curios how to build the system. I&#8217;ve asked alquez how to set it up and I built it from source. Then I got interested in Android 4.0 and looked at CM9. After I managed to build it, it booted with the CM7 kernel and you could get a shell but that was it. So I&#8217;ve started to look into the Kernel and read CM9 code. Now after two weeks of work the device shows a UI. The questions if it will work in the end. Most of the stuff is Open Source but you rely on some binary libraries for OpenGL and maybe will not work out in the end. Android 4.0 relies on a lot of features of the 3.0 Kernel, new netfilter modules, updated graphics stuff etc.</p>
<p>If it will not work out in the end, at least I worked on the Kernel <img src='http://blog.cryptomilk.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><a href="http://blog.cryptomilk.org/wp-content/uploads/2012/01/cm9_on_wfs.jpg"><img class="alignnone size-medium wp-image-273" title="cm9_on_wfs" src="http://blog.cryptomilk.org/wp-content/uploads/2012/01/cm9_on_wfs-239x300.jpg" alt="" width="239" height="300" /></a></p>
 <p><a href="http://blog.cryptomilk.org/?flattrss_redirect&amp;id=268&amp;md5=4000da3ccab953a76842d321ed36a596" title="Flattr" target="_blank"><img src="https://blog.cryptomilk.org/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.cryptomilk.org/2012/01/23/cyanogenmod-9-for-htc-wildfire-s/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=asn&amp;popout=1&amp;url=http%3A%2F%2Fblog.cryptomilk.org%2F2012%2F01%2F23%2Fcyanogenmod-9-for-htc-wildfire-s%2F&amp;language=en_GB&amp;category=text&amp;title=CyanogenMod+9+for+HTC+Wildfire+S&amp;description=I%26%238217%3Bve+got+a+new+gadget%2C+a+nice+and+small+Android+based+smartphone%2C+the+HTC+Wildfire+S+%28WFS%29.+The+week+before+I+got+it+alquez+finished+porting+CyanogenMod+7+to+the...&amp;tags=blog" type="text/html" />
	</item>
		<item>
		<title>strace</title>
		<link>http://blog.cryptomilk.org/2011/10/10/strace/</link>
		<comments>http://blog.cryptomilk.org/2011/10/10/strace/#comments</comments>
		<pubDate>Mon, 10 Oct 2011 12:09:56 +0000</pubDate>
		<dc:creator>Andreas Schneider</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[RedHat]]></category>

		<guid isPermaLink="false">http://blog.cryptomilk.org/?p=264</guid>
		<description><![CDATA[You&#8217;re traveling with your netbook and the network doesn&#8217;t work. Normally you start to debug it and look with strace what&#8217;s going on. But hey, Fedora doesn&#8217;t install strace by default and you can&#8217;t install it cause the network doesn&#8217;t work&#8230; m(]]></description>
			<content:encoded><![CDATA[<p>You&#8217;re traveling with your netbook and the network doesn&#8217;t work. Normally you start to debug it and look with strace what&#8217;s going on. But hey, Fedora doesn&#8217;t install strace by default and you can&#8217;t install it cause the network doesn&#8217;t work&#8230;</p>
<p>m(</p>
 <p><a href="http://blog.cryptomilk.org/?flattrss_redirect&amp;id=264&amp;md5=7e2c432bb40cc18f517e4cd8c5b1c678" title="Flattr" target="_blank"><img src="https://blog.cryptomilk.org/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.cryptomilk.org/2011/10/10/strace/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=asn&amp;popout=1&amp;url=http%3A%2F%2Fblog.cryptomilk.org%2F2011%2F10%2F10%2Fstrace%2F&amp;language=en_GB&amp;category=text&amp;title=strace&amp;description=You%26%238217%3Bre+traveling+with+your+netbook+and+the+network+doesn%26%238217%3Bt+work.+Normally+you+start+to+debug+it+and+look+with+strace+what%26%238217%3Bs+going+on.+But+hey%2C+Fedora+doesn%26%238217%3Bt+install+strace+by...&amp;tags=blog" type="text/html" />
	</item>
		<item>
		<title>jailbash</title>
		<link>http://blog.cryptomilk.org/2011/09/02/jailbash/</link>
		<comments>http://blog.cryptomilk.org/2011/09/02/jailbash/#comments</comments>
		<pubDate>Fri, 02 Sep 2011 16:31:33 +0000</pubDate>
		<dc:creator>Andreas Schneider</dc:creator>
				<category><![CDATA[KDE]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.cryptomilk.org/?p=256</guid>
		<description><![CDATA[chroot for users suck! It is work to maintain them and all in all you have to do a lot of nasty hacks to get it going! In the meantime AppArmor is in the mainline kernel. It is pretty simple to write rules for it and you can easily update it with tools like &#8216;logprof&#8217;. [...]]]></description>
			<content:encoded><![CDATA[<p>chroot for users suck!</p>
<p>It is work to maintain them and all in all you have to do a lot of nasty hacks to get it going! In the meantime <a href="http://wiki.apparmor.net/index.php/Main_Page">AppArmor</a> is in the mainline kernel. It is pretty simple to write rules for it and you can easily update it with tools like &#8216;logprof&#8217;.</p>
<p>Here is a small howto to trap users in their home directory with a simple AppArmor profile. First you need to compile the following C code:</p>
<pre>#include &lt;unistd.h&gt;

int main(int argc, char *argv[]) {
    return execv("/bin/bash", argv);
}</pre>
<p><code>gcc -o jailbash jailbash.c</code></p>
<p>Then move the binary to <code>/bin</code>.</p>
<p>The next step is to create an AppArmor profile for the jailbash. So create the file <code>/etc/apparmor.d/bin.jailbash</code> and add the following content:</p>
<pre># Last Modified: Tue Jun  7 08:53:41 2011
#----------------------------------------------------------
#
# JAILBASH
#
#----------------------------------------------------------

#include <tunables/global>

/bin/jailbash {
  #include <abstractions/X>
  #include <abstractions/base>
  #include <abstractions/bash>
  #include <abstractions/consoles>
  #include <abstractions/nameservice>
  #include <abstractions/user-manpages>
  #include <abstractions/user-tmp>

  deny /bin/df r,
  deny /etc/bash_command_not_found r,

  /bin/ r,
  /bin/bash rix,
  /bin/cat rix,
  /bin/chmod rix,
  /bin/chown rix,
  /bin/cp rix,
  /bin/date rix,
  /bin/egrep rix,
  /bin/grep rix,
  /bin/gunzip rix,
  /bin/gzip rix,
  /bin/jailbash rix,
  /bin/ln rix,
  /bin/ls rix,
  /bin/mkdir rix,
  /bin/mktemp rix,
  /bin/more rix,
  /bin/mv rix,
  /bin/ping rix,
  /bin/readlink rix,
  /bin/rm rix,
  /bin/rmdir rix,
  /bin/sed rix,
  /bin/sleep rix,
  /bin/tar rix,
  /bin/touch rix,
  /bin/uname rix,
  /bin/vim rix,
  /bin/vim-normal rix,
  /bin/zcat rix,
  /dev/null rw,
  /dev/urandom r,
  /etc/ r,
  /etc/manpath.config r,
  /etc/opt/ r,
  /etc/sysconfig/console r,
  /etc/sysconfig/mail r,
  /etc/sysconfig/news r,
  /etc/sysconfig/proxy r,
  /etc/sysconfig/suseconfig r,
  /etc/sysconfig/windowmanager r,
  /etc/vimrc r,
  owner /home/*/ r,
  owner /home/*/** rwl,
  /opt/ r,
  owner /proc/*/cmdline r,
  owner /proc/*/exe r,
  owner /proc/*/mounts r,
  /proc/loadavg r,
  /usr/X11R6/bin/ r,
  /usr/bin/ r,
  /usr/bin/dircolors rix,
  /usr/bin/head rix,
  /usr/bin/id rix,
  /usr/bin/less rix,
  /usr/bin/man rix,
  /usr/bin/manpath rix,
  /usr/bin/mc rix,
  /usr/bin/scp rix,
  /usr/bin/screen rix,
  /usr/bin/ssh rix,
  /usr/bin/ssh-add rix,
  /usr/bin/ssh-agent rix,
  /usr/bin/ssh-copy-id rix,
  /usr/bin/ssh-keygen rix,
  /usr/bin/ssh-keyscan rix,
  /usr/bin/tail rix,
  /usr/bin/tty rix,
  /usr/bin/vim-enhanced rix,
  /usr/bin/wget rix,
  /usr/bin/which rix,
  /usr/lib*/git/git-update-ref rix,
  /usr/lib*/mc/cons.saver rix,
  /usr/lib*/ssh/sftp-server rix,
  /usr/lib*/ssh/ssh-keysign rix,
  /usr/local/bin/ r,
  /usr/share/git-core/*/ r,
  /usr/share/mc/** r,
  /usr/share/vim/** r,
}</pre>
<p>This allows the user to execute the most basic commands he needs and allows ssh, sftp and git access. The user has access to some binaires and and can read directories he need for a working shell, like <code>/usr/lib</code>. The owner flag allows him only to write in his own home directory and browse only his home directory.</p>
<p>The next step is to create a new user and use <code>/bin/jailbash</code> as the bash. You can update the profile using <code>logprof</code> or manually if you watch <code>/var/log/audit/audit.log</code>.</p>
 <p><a href="http://blog.cryptomilk.org/?flattrss_redirect&amp;id=256&amp;md5=66c763e4b2758bb86d2624d82937fcb6" title="Flattr" target="_blank"><img src="https://blog.cryptomilk.org/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.cryptomilk.org/2011/09/02/jailbash/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=asn&amp;popout=1&amp;url=http%3A%2F%2Fblog.cryptomilk.org%2F2011%2F09%2F02%2Fjailbash%2F&amp;language=en_GB&amp;category=text&amp;title=jailbash&amp;description=chroot+for+users+suck%21+It+is+work+to+maintain+them+and+all+in+all+you+have+to+do+a+lot+of+nasty+hacks+to+get+it+going%21+In+the+meantime...&amp;tags=blog" type="text/html" />
	</item>
		<item>
		<title>Debugging cgit</title>
		<link>http://blog.cryptomilk.org/2011/08/04/debugging-cgit/</link>
		<comments>http://blog.cryptomilk.org/2011/08/04/debugging-cgit/#comments</comments>
		<pubDate>Thu, 04 Aug 2011 09:35:57 +0000</pubDate>
		<dc:creator>Andreas Schneider</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.cryptomilk.org/?p=243</guid>
		<description><![CDATA[For my git repositories I use cgit as the web frontend. The package I used had a problem displaying the treeview. Looking at /var/log/messages I saw that it segfaults. I&#8217;ve already fixed a segfault in cgit some time ago. I wondered how I was able to get gdb attached to it. It took me some [...]]]></description>
			<content:encoded><![CDATA[<p>For my git repositories I use <a href="http://hjemli.net/git/cgit/">cgit</a> as the web frontend. The package I used had a problem displaying the treeview. Looking at /var/log/messages I saw that it segfaults. I&#8217;ve already fixed a segfault in cgit some time ago. I wondered how I was able to get gdb attached to it. It took me some time to figure it out so this is the way to document it for the future. Maybe someone else will find this useful.</p>
<p>The command to display the html on the commandline is:</p>
<p><code>CGIT_CONFIG="/srv/www/vhosts/libssh/cgitrc" /srv/www/cgi-bin/cgit/cgit.cgi 1>cgit.html 2>cgit.log</code></p>
<p>This will write the html output to cgit.html and the errors to cgit.log. So if you want to display a tree of the project, the url to it would be for example: <a href="http://git.libssh.org/projects/libssh.git/">http://git.libssh.org/projects/libssh.git/</a></p>
<p>So on the commandline this is:</p>
<p><code>QUERY_STRING="url=projects/libssh.git" CGIT_CONFIG="/srv/www/vhosts/libssh/cgitrc" /srv/www/cgi-bin/cgit/cgit.cgi 1>cgit.html 2>cgit.log</code></p>
<p>and if you need gdb to get a segfault you can simply use:</p>
<p><code>QUERY_STRING="url=projects/libssh.git/tree" CGIT_CONFIG="/path/to/libssh/cgitrc" gdb /srv/www/cgi-bin/cgit/cgit.cgi</code></p>
<p>It segfaulted cause the current version doesn&#8217;t support git 1.7.6 and a NULL pointer was passed to a function instead of the right values.</p>
 <p><a href="http://blog.cryptomilk.org/?flattrss_redirect&amp;id=243&amp;md5=3fb93f603f2b816c4d8a408da3a36d75" title="Flattr" target="_blank"><img src="https://blog.cryptomilk.org/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.cryptomilk.org/2011/08/04/debugging-cgit/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=asn&amp;popout=1&amp;url=http%3A%2F%2Fblog.cryptomilk.org%2F2011%2F08%2F04%2Fdebugging-cgit%2F&amp;language=en_GB&amp;category=text&amp;title=Debugging+cgit&amp;description=For+my+git+repositories+I+use+cgit+as+the+web+frontend.+The+package+I+used+had+a+problem+displaying+the+treeview.+Looking+at+%2Fvar%2Flog%2Fmessages+I+saw+that+it+segfaults.+I%26%238217%3Bve...&amp;tags=blog" type="text/html" />
	</item>
		<item>
		<title>libsmbconf</title>
		<link>http://blog.cryptomilk.org/2011/04/14/libsmbconf/</link>
		<comments>http://blog.cryptomilk.org/2011/04/14/libsmbconf/#comments</comments>
		<pubDate>Thu, 14 Apr 2011 10:21:41 +0000</pubDate>
		<dc:creator>Andreas Schneider</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Samba]]></category>

		<guid isPermaLink="false">http://blog.cryptomilk.org/?p=229</guid>
		<description><![CDATA[Three years ago Michael Adam created a nice library to easily read the Samba configuration or modify it if it is stored in the registry. Since we have a new build system it is much easier to create shared libraries, I&#8217;ve created a public smbconf library now. The library can be used to setup Samba [...]]]></description>
			<content:encoded><![CDATA[<p>Three years ago <a href="http://www.samba.org/~obnox/">Michael Adam</a> created a nice library to easily read the <a href="http://www.samba.org/">Samba</a> configuration or modify it if it is stored in the registry. Since we have a new build system it is much easier to create shared libraries, I&#8217;ve created a public smbconf library now. The library can be used to setup Samba or Winbind without touching any files. Ok, smb.conf needs one entry: <code>config backend = registry</code>. This library should be available with Samba 3.6 which will be released some time this year.</p>
<p>You can find the documentation for the new library <a href="http://xor.cryptomilk.org/samba/libsmbconf/group__libsmbconf.html">here</a>.</p>
 <p><a href="http://blog.cryptomilk.org/?flattrss_redirect&amp;id=229&amp;md5=e0970ea4a0a1bdc8771837c1e5c4079f" title="Flattr" target="_blank"><img src="https://blog.cryptomilk.org/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.cryptomilk.org/2011/04/14/libsmbconf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=asn&amp;popout=1&amp;url=http%3A%2F%2Fblog.cryptomilk.org%2F2011%2F04%2F14%2Flibsmbconf%2F&amp;language=en_GB&amp;category=text&amp;title=libsmbconf&amp;description=Three+years+ago+Michael+Adam+created+a+nice+library+to+easily+read+the+Samba+configuration+or+modify+it+if+it+is+stored+in+the+registry.+Since+we+have+a+new...&amp;tags=blog" type="text/html" />
	</item>
		<item>
		<title>Logitech Linux Mouse Support</title>
		<link>http://blog.cryptomilk.org/2011/02/22/logitech-linux-mouse-support/</link>
		<comments>http://blog.cryptomilk.org/2011/02/22/logitech-linux-mouse-support/#comments</comments>
		<pubDate>Tue, 22 Feb 2011 14:30:14 +0000</pubDate>
		<dc:creator>Andreas Schneider</dc:creator>
				<category><![CDATA[Gaming]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.cryptomilk.org/?p=220</guid>
		<description><![CDATA[Maybe you ask: Why is there still no new version of lomoco to support the latest Logitech Mice? The answer is that I still don&#8217;t know how they detect a mouse connected to a receiver. Maybe they just have a table which defines which mice come with which receiver and then try some commands. If [...]]]></description>
			<content:encoded><![CDATA[<p>Maybe you ask: Why is there still no new version of lomoco to support the latest Logitech Mice?</p>
<p>The answer is that I still don&#8217;t know how they detect a mouse connected to a receiver. Maybe they just have a table which defines which mice come with which receiver and then try some commands. If it fails it is mouse X and if not it must be mouse Y.</p>
<p>I already wrote some proof of concept for the new protocol and sometimes people contact me and the proof of concept is enough for them. So here is a list of small proof of concept utils:</p>
<h2>g_hack.c</h2>
<p>This is a tool to change the resolution on some gaming mice like the G5, G7 and G9.</p>
<p><a href="http://xor.cryptomilk.org/pics/s3_lsarpc_over_tcpip.png">http://git.lomoco.org/projects/lomoco.git/tree/proof-of-concept/g_hack.c</a></p>
<h2>lomoco_battery.c</h2>
<p>Battery information for a lot of cordless mice like MX, VX and VX Nano.</p>
<p><a href="http://git.lomoco.org/projects/lomoco.git/tree/proof-of-concept/lomoco_battery.c">http://git.lomoco.org/projects/lomoco.git/tree/proof-of-concept/lomoco_battery.c</a></p>
<h2>lomoco_reconnect.c</h2>
<p>This allows you to reconnect your cordless mouse to the receiver. This is for MX, VX or VX Nano.</p>
<p><a href="http://git.lomoco.org/projects/lomoco.git/tree/proof-of-concept/lomoco_reconnect.c">http://git.lomoco.org/projects/lomoco.git/tree/proof-of-concept/lomoco_reconnect.c</a></p>
 <p><a href="http://blog.cryptomilk.org/?flattrss_redirect&amp;id=220&amp;md5=6e481a9f223c508acbe980db5145a48d" title="Flattr" target="_blank"><img src="https://blog.cryptomilk.org/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.cryptomilk.org/2011/02/22/logitech-linux-mouse-support/feed/</wfw:commentRss>
		<slash:comments>44</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=asn&amp;popout=1&amp;url=http%3A%2F%2Fblog.cryptomilk.org%2F2011%2F02%2F22%2Flogitech-linux-mouse-support%2F&amp;language=en_GB&amp;category=text&amp;title=Logitech+Linux+Mouse+Support&amp;description=Maybe+you+ask%3A+Why+is+there+still+no+new+version+of+lomoco+to+support+the+latest+Logitech+Mice%3F+The+answer+is+that+I+still+don%26%238217%3Bt+know+how+they+detect+a...&amp;tags=blog" type="text/html" />
	</item>
	</channel>
</rss>

