<?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>Maven &#187; Linux</title>
	<atom:link href="http://readme.maven.pl/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://readme.maven.pl</link>
	<description>arekm page</description>
	<lastBuildDate>Sat, 17 Dec 2011 23:33:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Asus E35M1-I DELUXE, surround 5.1 sound and dmix</title>
		<link>http://readme.maven.pl/2011/10/30/asus-e35m1-i-deluxe-surround-5-1-sound-and-dmix/</link>
		<comments>http://readme.maven.pl/2011/10/30/asus-e35m1-i-deluxe-surround-5-1-sound-and-dmix/#comments</comments>
		<pubDate>Sun, 30 Oct 2011 18:59:23 +0000</pubDate>
		<dc:creator>arekm</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://readme.maven.pl/?p=70</guid>
		<description><![CDATA[Make HDMI card be second while SB card be first one: options snd-hda-intel index=1,0 Enable dmix with surround 5.1 support (no upmixing): pcm.dmixer { type dmix ipc_key 1024 ipc_key_add_uid false # let multiple users share ipc_perm 0666 # IPC permissions (octal, default 0600) slave { pcm "hw:0,0" channels 6 # buffer_size 16384 } } pcm.!default [...]]]></description>
			<content:encoded><![CDATA[<p>Make HDMI card be second while SB card be first one:</p>
<p><code><br />
options snd-hda-intel index=1,0<br />
</code></p>
<p>Enable dmix with surround 5.1 support (no upmixing):</p>
<p><code><br />
pcm.dmixer {<br />
                type dmix<br />
                ipc_key 1024<br />
                ipc_key_add_uid false # let multiple users share<br />
                ipc_perm 0666 # IPC permissions (octal, default 0600)<br />
                slave {<br />
                        pcm "hw:0,0"<br />
                        channels 6<br />
#       buffer_size 16384<br />
                }<br />
}</p>
<p>pcm.!default {<br />
        type plug<br />
                slave.pcm dmixer<br />
                slave.channels 6<br />
}<br />
</code></p>
<p>to /etc/asound.conf. Enable 6 channels in alsamixer, too.</p>
]]></content:encoded>
			<wfw:commentRss>http://readme.maven.pl/2011/10/30/asus-e35m1-i-deluxe-surround-5-1-sound-and-dmix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eating power &#8211; Intel GM45 vs Radeon HD 3400</title>
		<link>http://readme.maven.pl/2009/03/26/eating-power-intel-gm45-vs-radeon-hd-3400/</link>
		<comments>http://readme.maven.pl/2009/03/26/eating-power-intel-gm45-vs-radeon-hd-3400/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 08:21:57 +0000</pubDate>
		<dc:creator>arekm</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.maven.pl/?p=52</guid>
		<description><![CDATA[ThinkPad T400 switched into integrated gpu mode &#8211; running Intel GM45 eats ~12W of power. ThinkPad T400 switched into discrete gpu mode &#8211; running Radeon HD 3400 eats &#8230; ~28W of power! Which means that radeon itself eats more than 16W of power (meausred with powertop). That&#8217;s more than whole notebook in integrated gpu mode. [...]]]></description>
			<content:encoded><![CDATA[<p>ThinkPad T400 switched into integrated gpu mode &#8211; running Intel GM45 eats ~12W of power.<br />
ThinkPad T400 switched into discrete gpu mode &#8211; running Radeon HD 3400 eats &#8230; ~28W of power!</p>
<p>Which means that radeon itself eats more than 16W of power (meausred with powertop). That&#8217;s more than whole notebook in integrated gpu mode. Nightmare!</p>
<p>Note that HD 3400 was driven by open source radeon driver which doesn&#8217;t have any power management support at this moment.</p>
<p>200904 update: ati driver in git contains updated power management and it&#8217;s eating ~16W here instead of ~28W now with DynamicPM turned on.</p>
]]></content:encoded>
			<wfw:commentRss>http://readme.maven.pl/2009/03/26/eating-power-intel-gm45-vs-radeon-hd-3400/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Very fast IPv6 setup on PLD/Linux Th</title>
		<link>http://readme.maven.pl/2008/11/29/very-fast-ipv6-setup-on-pldlinux-th/</link>
		<comments>http://readme.maven.pl/2008/11/29/very-fast-ipv6-setup-on-pldlinux-th/#comments</comments>
		<pubDate>Sat, 29 Nov 2008 19:20:33 +0000</pubDate>
		<dc:creator>arekm</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.maven.pl/?p=47</guid>
		<description><![CDATA[If you need IPv6 on some PLD Th machine, like in my case laptop, you can just do: poldek -uGv miredo-client-teredo service miredo-teredo start and verify that IPv6 works by doing for example: mtr -6 www.pld-linux.org This solution doesn&#8217;t require any configuration (well, there are some options that can be altered). It should work even [...]]]></description>
			<content:encoded><![CDATA[<p>If you need IPv6 on some PLD Th machine, like in my case laptop, you can just do:<br />
<code><br />
poldek -uGv miredo-client-teredo<br />
service miredo-teredo start<br />
</code></p>
<p>and verify that IPv6 works by doing for example:<br />
<code><br />
mtr -6 www.pld-linux.org<br />
</code></p>
<p>This solution doesn&#8217;t require any configuration (well, there are some options that can be altered). It should work even if you are behind some NATs and other weird gateways thanks to <a href="http://en.wikipedia.org/wiki/Teredo_tunneling">Teredo</a>.</p>
<p>Working setup causes new interface to appear, for example:</p>
<p><code></p>
<p>20: teredo: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1280 qdisc pfifo_fast state UNKNOWN qlen 500<br />
    link/[65534]<br />
    inet6 2001:x:xx:xx:xx:xx:xx:e4b6/32 scope global<br />
       valid_lft forever preferred_lft forever<br />
    inet6 fe80::ffff:ffff:ffff/64 scope link<br />
       valid_lft forever preferred_lft forever</p>
<p></code></p>
<p>Of course there are other solutions for non-native IPv6 like <a href="http://en.wikipedia.org/wiki/6to4">6to4</a> (pure rc-scripts are enough), <a href="http://en.wikipedia.org/wiki/ISATAP">ISATAP</a> (see miredo-client-isatap package) or just typical SIT tunnel.</p>
]]></content:encoded>
			<wfw:commentRss>http://readme.maven.pl/2008/11/29/very-fast-ipv6-setup-on-pldlinux-th/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Booting PLD/DOS from USB pendrive</title>
		<link>http://readme.maven.pl/2007/11/03/booting-plddos-from-usb-pendrive/</link>
		<comments>http://readme.maven.pl/2007/11/03/booting-plddos-from-usb-pendrive/#comments</comments>
		<pubDate>Fri, 02 Nov 2007 22:15:23 +0000</pubDate>
		<dc:creator>arekm</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.maven.pl/2007/11/03/booting-plddos-from-usb-pendrive/</guid>
		<description><![CDATA[Create partition on your flash drive (using fdisk or cfdisk). Mark one of partitions bootable in fdisk/cdisk. Format that partition with FAT/FAT32 filesystem: mkfs.vfat -F 32 /dev/sdXY where sdXY is your partition. Mount it and copy contents of PLD RescueCD like x86 and x86_64 ISO image to that partition, to /rcd subdirectory. Make MBR record: [...]]]></description>
			<content:encoded><![CDATA[<p>Create partition on your flash drive (using fdisk or cfdisk). Mark one of partitions bootable in fdisk/cdisk. Format that partition with FAT/FAT32 filesystem:<br />
<code><br />
mkfs.vfat -F 32 /dev/sdXY<br />
</code><br />
where sdXY is your partition.</p>
<p>Mount it and copy contents of <a HREF="http://rescuecd.pld-linux.org/">PLD RescueCD</a> like <a HREF="http://rescuecd.pld-linux.org/download/PLDRescueCD-2.92/x86_and_x86_64/RCD_292.iso">x86 and x86_64 ISO</a> image to that partition, to <em>/rcd</em> subdirectory.</p>
<p>Make MBR record:<br />
<code><br />
ms-sys -s /dev/sdX<br />
</code><br />
(where sdX is entire flash disk; ms-sys comes from <a HREF="http://ms-sys.sourceforge.net/">ms-sys</a> package)</p>
<p>Copy <a HREF="http://readme.maven.pl/wp-content/uploads/2007/11/syslinuxcfg.txt" TITLE="syslinux for USB">syslinux configuration for USB</a> to root directory of your flash drive as syslinux.cfg.  <a href="http://bootdisk.com/">DOS/Windows image</a> should be placed in /rcd/boot/dos.gz (compress it with gzip first).</p>
<p>Run:<br />
<code><br />
syslinux -s /dev/sdXY<br />
</code><br />
to load syslinux onto your flash drive.</p>
<p>Reboot your system and check if it boots correctly <img src='http://readme.maven.pl/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Note that some systems have problems with booting from flash driver (especially big like 1G or 2G flash drives).</p>
]]></content:encoded>
			<wfw:commentRss>http://readme.maven.pl/2007/11/03/booting-plddos-from-usb-pendrive/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Booting PLD RescueCD from LILO</title>
		<link>http://readme.maven.pl/2007/08/30/booting-pld-rescuecd-from-lilo/</link>
		<comments>http://readme.maven.pl/2007/08/30/booting-pld-rescuecd-from-lilo/#comments</comments>
		<pubDate>Thu, 30 Aug 2007 19:52:58 +0000</pubDate>
		<dc:creator>arekm</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.maven.pl/2007/08/30/booting-pld-rescuecd-from-lilo/</guid>
		<description><![CDATA[Copy files from rescuecd iso image and add section similar to this one to lilo.conf: image=/boot/rescuecd-20070617/boot/isolinux/vmlinuz label=rcd root=/dev/ram0 initrd=/boot/rescuecd-20070617/rescue.cpi append=" console=tty0 console=ttyS1,38400n81 panic=60"]]></description>
			<content:encoded><![CDATA[<p>Copy files from rescuecd iso image and add section similar to this one to lilo.conf:<br />
<code><br />
image=/boot/rescuecd-20070617/boot/isolinux/vmlinuz<br />
label=rcd<br />
root=/dev/ram0<br />
initrd=/boot/rescuecd-20070617/rescue.cpi<br />
append=" console=tty0 console=ttyS1,38400n81 panic=60"<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://readme.maven.pl/2007/08/30/booting-pld-rescuecd-from-lilo/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Opera Browser (for Linux) and multimedia</title>
		<link>http://readme.maven.pl/2007/05/26/opera-browser-for-linux-and-multimedia/</link>
		<comments>http://readme.maven.pl/2007/05/26/opera-browser-for-linux-and-multimedia/#comments</comments>
		<pubDate>Sat, 26 May 2007 19:51:54 +0000</pubDate>
		<dc:creator>arekm</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.maven.pl/?p=37</guid>
		<description><![CDATA[Did you ever try mplayerplug-in with Opera? It&#8217;s very bad. Pure X11, no GUI at all. Fortunately there is plugin rewrite under gecko-mediaplayer name which uses new gnome-mplayer tool. Works nicely with GUI under Opera web browser (of course other browsers like Mozilla are supported) ! Available in PLD Th (testing) as rpm packages. See screenshot:]]></description>
			<content:encoded><![CDATA[<p>Did you ever try <a HREF="http://mplayerplug-in.sourceforge.net/" TITLE="mplayerplug-in">mplayerplug-in</a> with <a HREF="http://www.opera.com/" TITLE="Opera Web Browser">Opera</a>? It&#8217;s very bad. Pure X11, no GUI at all. Fortunately there is plugin rewrite under <a HREF="http://dekorte.homeip.net/download/gecko-mediaplayer/" TITLE="gecko-mediaplayer">gecko-mediaplayer</a> name which uses new <a HREF="http://dekorte.homeip.net/download/gnome-mplayer/" TITLE="gnome-mplayer">gnome-mplayer</a> tool. Works nicely with GUI under Opera web browser (of course other browsers like Mozilla are supported) ! Available in<a HREF="http://www.pld-linux.org/" TITLE="PLD"> PLD Th</a> (testing) as rpm packages.</p>
<p>See screenshot:</p>
<p><a TITLE="gecko-mediaplayer plugin" HREF="http://readme.maven.pl/wp-content/uploads/2007/05/gecko-mediaplayer.png"><img ALT="gecko-mediaplayer plugin" SRC="http://readme.maven.pl/wp-content/uploads/2007/05/gecko-mediaplayer.thumbnail.png" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://readme.maven.pl/2007/05/26/opera-browser-for-linux-and-multimedia/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PXE remote boot for your home/work lab</title>
		<link>http://readme.maven.pl/2007/01/13/pxe-remote-boot-for-your-homework-lab/</link>
		<comments>http://readme.maven.pl/2007/01/13/pxe-remote-boot-for-your-homework-lab/#comments</comments>
		<pubDate>Sat, 13 Jan 2007 16:26:55 +0000</pubDate>
		<dc:creator>arekm</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Servers]]></category>

		<guid isPermaLink="false">http://www.maven.pl/?p=29</guid>
		<description><![CDATA[PXE is a well known and widely used in some enviroments. I&#8217;m quite often playing with some servers, testing, installing various things, reflashing firmwares etc. Usually that was done with PLD RescueCD on a CDRW medium, (Free)DOS images/isos etc. Unfortunately burning different stuff over and over is annoying. How to do something nice and usable? [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Preboot_Execution_Environment">PXE</a> is a well known and widely used in some enviroments. I&#8217;m quite often playing with some servers, testing, installing various things, reflashing firmwares etc. Usually that was done with <a href="http://rescuecd.pld-linux.org/">PLD RescueCD</a> on a CDRW medium, (Free)DOS images/isos etc. Unfortunately burning different stuff over and over is annoying. How to do something nice and usable?
</p>
<p><span id="more-29"></span></p>
<p>
What you need is a <a href="http://www.isc.org/sw/dhcp/">dhcp server</a>, <a href="ftp://ftp.linux.org.uk/pub/linux/Networking/netkit/">tftp server</a> and PXE ready client machines (most of newer hardware has ability to boot from network over PXE).
</p>
<p><b>Setting dhcp server</b>.</p>
<p>Beside standard network settings in <i>dhcpd.conf</i> you will need:</p>
<blockquote><p>
allow booting ;<br />
allow bootp ;<br />
next-server 192.168.0.250 ;<br />
filename &#8220;/pxelinux.0&#8243; ;
</p></blockquote>
<p><b>Setting tftp server</b></p>
<p>Under <a href="http://www.pld-linux.org/">PLD</a> that means just installing atftpd package. If you built from sources then run something like:</p>
<blockquote><p>
atftpd -v5 &#8211;daemon /var/lib/tftp
</p></blockquote>
<p><b>pxelinux</b></p>
<p>
You will also need <a href="http://syslinux.zytor.com/">syslinux</a> package that comes with <i>pxelinux</i>. pxelinux will load multiple images for us depending on user choice. Use latest available version (3.31 at this moment) because older version miss important piece of functionality (menus).
</p>
<p><b>/var/lib/tftp preparation</b></p>
<p>Structure I use is shown below. The most important thing is a pxelinux.0 file (symlink to real file in my case) that is whole pxelinux loader that comes with syslinux package. pxelinux uses configuration file from pxelinux.cfg directory. pxelinux tries to load various configuration files and stops at first found:</p>
<blockquote><p>
Jan 13 15:29:12 arm atftpd[5234]: Serving /pxelinux.cfg/01-00-a0-cc-da-d9-3c to 192.168.0.113:57089<br />
Jan 13 15:29:12 arm atftpd[5234]: Serving /pxelinux.cfg/C0A80071 to 192.168.0.113:57090<br />
Jan 13 15:29:12 arm atftpd[5234]: Serving /pxelinux.cfg/C0A8007 to 192.168.0.113:57091<br />
Jan 13 15:29:12 arm atftpd[5234]: Serving /pxelinux.cfg/C0A800 to 192.168.0.113:57092<br />
Jan 13 15:29:12 arm atftpd[5234]: Serving /pxelinux.cfg/C0A80 to 192.168.0.113:57093<br />
Jan 13 15:29:12 arm atftpd[5234]: Serving /pxelinux.cfg/C0A8 to 192.168.0.113:57094<br />
Jan 13 15:29:12 arm atftpd[5234]: Serving /pxelinux.cfg/C0A to 192.168.0.113:57095<br />
Jan 13 15:29:12 arm atftpd[5234]: Serving /pxelinux.cfg/C0 to 192.168.0.113:57096<br />
Jan 13 15:29:12 arm atftpd[5234]: Serving /pxelinux.cfg/C to 192.168.0.113:57097<br />
Jan 13 15:29:12 arm atftpd[5234]: Serving /pxelinux.cfg/default to 192.168.0.113:57098
</p></blockquote>
<p>This means that we can have different configurations for different machines (based on MAC address of machine ehternet card). I&#8217;m using <i>default</i> configuration file which is always tried.</p>
<p>My entire <i>/var/lib/tftp</i> structure:</p>
<blockquote><p>
[root@arm /var/lib/tftp]# ls -alR<br />
.:<br />
total 1456<br />
drwxr-xr-x  9 root root    4096 Jan 13 15:26 .<br />
drwxr-xr-x 35 root root    4096 Jan 12 17:35 ..<br />
-rw-r&#8211;r&#8211;  1 root root    5237 Jan 13 15:25 pxe-background.png<br />
lrwxrwxrwx  1 root root      30 Jan 12 17:41 pxelinux.0 -> /usr/lib64/syslinux/pxelinux.0<br />
drwxr-xr-x  2 root root      20 Jan 13 16:51 pxelinux.cfg<br />
drwxr-xr-x  4 root root      47 Jan 12 09:47 rescue-x86-20060625<br />
drwxr-xr-x  4 root root      47 Jan 12 11:39 rescue-x86-20070109<br />
drwxr-xr-x  4 root root      47 Jan 12 09:47 rescue-x86_64-20060625<br />
drwxr-xr-x  2 root root      31 Jan 12 10:37 suse-10.1<br />
drwxr-xr-x  2 root root      60 Jan 12 10:06 suse-9.2<br />
drwxr-xr-x  2 root root      60 Jan 12 10:05 suse-9.3<br />
lrwxrwxrwx  1 root root      19 Jan 12 17:41 syslinux -> /usr/lib64/syslinux<br />
-rw-r&#8211;r&#8211;  1 root root 1474560 Nov 18  1999 winb98se.img</p>
<p>./pxelinux.cfg:<br />
total 8<br />
drwxr-xr-x 2 root root   20 Jan 13 16:51 .<br />
drwxr-xr-x 9 root root 4096 Jan 13 15:26 ..<br />
-rw-r&#8211;r&#8211; 1 root root 2152 Jan 13 15:24 default</p>
<p>./rescue-x86-20060625:<br />
total 54340<br />
drwxr-xr-x 4 root root       47 Jan 12 09:47 .<br />
drwxr-xr-x 9 root root     4096 Jan 13 15:26 ..<br />
drwxr-xr-x 3 root root      104 Jun 25  2006 boot<br />
drwxr-xr-x 2 root root       24 Jan 12 09:53 custom<br />
-rw-r&#8211;r&#8211; 1 root root 55638528 Jun 25  2006 rescue.cpi</p>
<p>./rescue-x86-20060625/boot:<br />
total 36<br />
drwxr-xr-x 3 root root   104 Jun 25  2006 .<br />
drwxr-xr-x 4 root root    47 Jan 12 09:47 ..<br />
-rw-r&#8211;r&#8211; 1 root root 17131 Jun 15  2006 ElTorito.img.gz<br />
-rw-r&#8211;r&#8211; 1 root root   744 Jun 15  2006 README<br />
-rw-r&#8211;r&#8211; 1 root root    83 Jun 15  2006 boot.bat<br />
-rw-r&#8211;r&#8211; 1 root root  1475 Jun 15  2006 floppy.img.gz<br />
drwxr-xr-x 2 root root   138 Jun 25  2006 isolinux<br />
-rwxr-xr-x 1 root root  3695 Jun 25  2006 isomod</p>
<p>./rescue-x86-20060625/boot/isolinux:<br />
total 1508<br />
drwxr-xr-x 2 root root     138 Jun 25  2006 .<br />
drwxr-xr-x 3 root root     104 Jun 25  2006 ..<br />
-r&#8211;r&#8211;r&#8211; 1 root root    2048 Jun 25  2006 boot.catalog<br />
-rw-r&#8211;r&#8211; 1 root root    1594 Jun 25  2006 boot.msg<br />
-rw-r&#8211;r&#8211; 1 root root    1443 Jun 15  2006 help.msg<br />
-rw-r&#8211;r&#8211; 1 root root  357528 Jun 25  2006 initrd.ide<br />
-rw-r&#8211;r&#8211; 1 root root   10440 Jun 25  2006 isolinux.bin<br />
-rw-r&#8211;r&#8211; 1 root root    1156 Jun 15  2006 isolinux.cfg<br />
-rw-r&#8211;r&#8211; 1 root root   94760 Jun 15  2006 memtest<br />
-rw-r&#8211;r&#8211; 1 root root 1056768 Jun 25  2006 vmlinuz</p>
<p>./rescue-x86-20060625/custom:<br />
total 4<br />
drwxr-xr-x 2 root root   24 Jan 12 09:53 .<br />
drwxr-xr-x 4 root root   47 Jan 12 09:47 ..<br />
-rw-r&#8211;r&#8211; 1 root root 1024 Jun 25  2006 custom.cpio</p>
<p>./rescue-x86-20070109:<br />
total 52768<br />
drwxr-xr-x 4 root root       47 Jan 12 11:39 .<br />
drwxr-xr-x 9 root root     4096 Jan 13 15:26 ..<br />
drwxr-xr-x 3 root root      104 Jan  9 01:10 boot<br />
drwxr-xr-x 2 root root       24 Jan  9 01:10 custom<br />
-rw-r&#8211;r&#8211; 1 root root 54028800 Jan  9 01:10 rescue.cpi</p>
<p>./rescue-x86-20070109/boot:<br />
total 36<br />
drwxr-xr-x 3 root root   104 Jan  9 01:10 .<br />
drwxr-xr-x 4 root root    47 Jan 12 11:39 ..<br />
-rw-r&#8211;r&#8211; 1 root root 17131 Jun 15  2006 ElTorito.img.gz<br />
-rw-r&#8211;r&#8211; 1 root root   744 Jun 15  2006 README<br />
-rw-r&#8211;r&#8211; 1 root root    83 Jun 15  2006 boot.bat<br />
-rw-r&#8211;r&#8211; 1 root root  1475 Jun 15  2006 floppy.img.gz<br />
drwxr-xr-x 2 root root   138 Jan  9 01:10 isolinux<br />
-rwxr-xr-x 1 root root  3695 Jan  9 01:10 isomod</p>
<p>./rescue-x86-20070109/boot/isolinux:<br />
total 1708<br />
drwxr-xr-x 2 root root     138 Jan  9 01:10 .<br />
drwxr-xr-x 3 root root     104 Jan  9 01:10 ..<br />
-r&#8211;r&#8211;r&#8211; 1 root root    2048 Jan  9 01:10 boot.catalog<br />
-rw-r&#8211;r&#8211; 1 root root    1594 Jan  8 21:33 boot.msg<br />
-rw-r&#8211;r&#8211; 1 root root    1443 Jun 15  2006 help.msg<br />
-rw-r&#8211;r&#8211; 1 root root  381123 Jan  9 01:10 initrd.ide<br />
-rw-r&#8211;r&#8211; 1 root root   10440 Jan  9 01:10 isolinux.bin<br />
-rw-r&#8211;r&#8211; 1 root root    1156 Jun 15  2006 isolinux.cfg<br />
-rw-r&#8211;r&#8211; 1 root root   94760 Jun 15  2006 memtest<br />
-rw-r&#8211;r&#8211; 1 root root 1234944 Jan  9 01:05 vmlinuz</p>
<p>./rescue-x86-20070109/custom:<br />
total 4<br />
drwxr-xr-x 2 root root   24 Jan  9 01:10 .<br />
drwxr-xr-x 4 root root   47 Jan 12 11:39 ..<br />
-rw-r&#8211;r&#8211; 1 root root 1024 Jan  9 01:10 custom.cpio</p>
<p>./rescue-x86_64-20060625:<br />
total 44900<br />
drwxr-xr-x 4 root root       47 Jan 12 09:47 .<br />
drwxr-xr-x 9 root root     4096 Jan 13 15:26 ..<br />
drwxr-xr-x 3 root root      104 Jun 25  2006 boot<br />
drwxr-xr-x 2 root root       24 Jun 25  2006 custom<br />
-rw-r&#8211;r&#8211; 1 root root 45970224 Jun 25  2006 rescue.cpi</p>
<p>./rescue-x86_64-20060625/boot:<br />
total 36<br />
drwxr-xr-x 3 root root   104 Jun 25  2006 .<br />
drwxr-xr-x 4 root root    47 Jan 12 09:47 ..<br />
-rw-r&#8211;r&#8211; 1 root root 17131 Jun 15  2006 ElTorito.img.gz<br />
-rw-r&#8211;r&#8211; 1 root root   744 Jun 15  2006 README<br />
-rw-r&#8211;r&#8211; 1 root root    83 Jun 15  2006 boot.bat<br />
-rw-r&#8211;r&#8211; 1 root root  1475 Jun 15  2006 floppy.img.gz<br />
drwxr-xr-x 2 root root   138 Jun 25  2006 isolinux<br />
-rwxr-xr-x 1 root root  3695 Jun 25  2006 isomod</p>
<p>./rescue-x86_64-20060625/boot/isolinux:<br />
total 1776<br />
drwxr-xr-x 2 root root     138 Jun 25  2006 .<br />
drwxr-xr-x 3 root root     104 Jun 25  2006 ..<br />
-r&#8211;r&#8211;r&#8211; 1 root root    2048 Jun 25  2006 boot.catalog<br />
-rw-r&#8211;r&#8211; 1 root root    1530 Jun 25  2006 boot.msg<br />
-rw-r&#8211;r&#8211; 1 root root    1197 Jun 18  2006 help.msg<br />
-rw-r&#8211;r&#8211; 1 root root  364891 Jun 25  2006 initrd.ide<br />
-rw-r&#8211;r&#8211; 1 root root   10440 Jun 25  2006 isolinux.bin<br />
-rw-r&#8211;r&#8211; 1 root root     701 Jun 15  2006 isolinux.cfg<br />
-rw-r&#8211;r&#8211; 1 root root   94760 Jun 15  2006 memtest<br />
-rw-r&#8211;r&#8211; 1 root root 1321472 Jun 25  2006 vmlinuz</p>
<p>./rescue-x86_64-20060625/custom:<br />
total 4<br />
drwxr-xr-x 2 root root   24 Jun 25  2006 .<br />
drwxr-xr-x 4 root root   47 Jan 12 09:47 ..<br />
-rw-r&#8211;r&#8211; 1 root root 1024 Jun 25  2006 custom.cpio</p>
<p>./suse-10.1:<br />
total 9164<br />
drwxr-xr-x 2 root root      31 Jan 12 10:37 .<br />
drwxr-xr-x 9 root root    4096 Jan 13 15:26 ..<br />
-rw-r&#8211;r&#8211; 1 root root 8137429 May  3  2006 initrd<br />
-rw-r&#8211;r&#8211; 1 root root 1237785 May  3  2006 linux</p>
<p>./suse-9.2:<br />
total 12972<br />
drwxr-xr-x 2 root root      60 Jan 12 10:06 .<br />
drwxr-xr-x 9 root root    4096 Jan 13 15:26 ..<br />
-rw-r&#8211;r&#8211; 1 root root 5379369 Oct 21  2004 initrd<br />
-rw-r&#8211;r&#8211; 1 root root 4730075 Oct 20  2004 initrd64<br />
-rw-r&#8211;r&#8211; 1 root root 1555945 Oct 21  2004 linux<br />
-rw-r&#8211;r&#8211; 1 root root 1608082 Oct 20  2004 linux64</p>
<p>./suse-9.3:<br />
total 14932<br />
drwxr-xr-x 2 root root      60 Jan 12 10:05 .<br />
drwxr-xr-x 9 root root    4096 Jan 13 15:26 ..<br />
-rw-r&#8211;r&#8211; 1 root root 6183757 Mar 24  2005 initrd<br />
-rw-r&#8211;r&#8211; 1 root root 6048487 Mar 24  2005 initrd64<br />
-rw-r&#8211;r&#8211; 1 root root 1424645 Mar 24  2005 linux<br />
-rw-r&#8211;r&#8211; 1 root root 1625590 Mar 24  2005 linux64</p>
</blockquote>
<p><i>rescue-*</i> directories contain unmodified copy of PLD RescueCD ISO images content. <i>suse-*</i> contain kernel images and initrd file copied from SuSE installation cdrom/dvd. <i>winb98se.img</i> is a image of Windows 98 SE boot floppy disk.</p>
<p><b>pxelinux &#8220;default&#8221; configuration file</b></p>
<p>
The configuration file is shown below. <i>vesamenu.c32</i> allows do display menus in graphical mode with background jpg/png images. For pure text mode there is <i>menu.c32</i>. <i>MENU LABEL</i> allows to add text message shown in menu for single <i>label</i> part of configuration.
</p>
<p> &#8220;^&#8221; is used to mark keyboard shortcut letter.</p>
<p> Windows floppy image uses special loader called <i>memdisk</i> which allows to boot legacy operating systems.</p>
<p> CPU identification case is interesting because it starts entire new &#8220;program&#8221; named <i>cpuidtest.c32</i> which is the same kind of &#8220;program&#8221; as <i>vesamenu.c32</i>. That&#8217;s way of handling allows us to create multiple submenus which will read different configuration files specified in <i>APPEND</i> directive &#8211; example:</p>
<blockquote><p>
LABEL newmenu<br />
        MENU LABEL New Menu<br />
        KERNEL vesamenu.c32<br />
        APPEND something.conf newmenu.conf
</p></blockquote>
<p>I don&#8217;t use submenus in my setup though.</p>
<blockquote><p>
[root@arm /var/lib/tftp]# cat pxelinux.cfg/default<br />
DEFAULT syslinux/vesamenu.c32<br />
MENU BACKGROUND pxe-background.png<br />
PROMPT 0</p>
<p>MENU TITLE Remote Boot Services</p>
<p>label rescue-x86<br />
  MENU LABEL ^1. PLD Rescue 20060625 x86<br />
  kernel rescue-x86-20060625/boot/isolinux/vmlinuz<br />
  append initrd=rescue-x86-20060625/rescue.cpi,rescue-x86-20060625/custom/custom.cpio root=/dev/ram0 CONF=&#8221;`/dev/fd0:/rescue`;;;;;;;;;;;&#8221;<br />
  ipappend 1</p>
<p>label rescue-x86<br />
  MENU LABEL ^2. PLD Rescue 20070109 x86<br />
  kernel rescue-x86-20070109/boot/isolinux/vmlinuz<br />
  append initrd=rescue-x86-20070109/rescue.cpi,rescue-x86-20070109/custom/custom.cpio root=/dev/ram0 CONF=&#8221;`/dev/fd0:/rescue`;;;;;;;;;;;&#8221;<br />
  ipappend 1</p>
<p>label rescue-x86_64<br />
  MENU LABEL ^3. PLD Rescue 20060625 x86_64<br />
  kernel rescue-x86_64-20060625/boot/isolinux/vmlinuz<br />
  append initrd=rescue-x86_64-20060625/rescue.cpi,rescue-x86_64-20060625/custom/custom.cpio root=/dev/ram0 CONF=&#8221;`/dev/fd0:/rescue`;;;;;;;;;;;&#8221;</p>
<p>label suse-install-9.2-x86<br />
  MENU LABEL ^4. SuSE Linux Install 9.2 x86<br />
  kernel suse-9.2/linux<br />
  append initrd=suse-9.2/initrd splash=silent showopts install=ftp://192.168.1.250/SUSE/9.2</p>
<p>label suse-install-9.2-x86_64<br />
  MENU LABEL ^5. SuSE Linux Install 9.2 x86_64<br />
  kernel suse-9.2/linux64<br />
  append initrd=suse-9.2/initrd64 splash=silent showopts install=ftp://192.168.1.250/SUSE/9.2</p>
<p>label suse-install-9.3-x86<br />
  MENU LABEL ^6. SuSE Linux Install 9.3 x86<br />
  kernel suse-9.3/linux<br />
  append initrd=suse-9.3/initrd splash=silent showopts install=ftp://192.168.1.250/SUSE/9.3</p>
<p>label suse-install-9.3-x86_64<br />
  MENU LABEL ^7. SuSE Linux Install 9.3 x86_64<br />
  kernel suse-9.3/linux64<br />
  append initrd=suse-9.3/initrd64 splash=silent showopts install=ftp://192.168.1.250/SUSE/9.3</p>
<p>label suse-install-10.1-x86<br />
  MENU LABEL ^8. SuSE Linux Install 10.1 x86<br />
  kernel suse-10.1/linux<br />
  append initrd=suse-10.1/initrd splash=silent showopts install=ftp://192.168.1.250/SUSE/10.1</p>
<p>label win98se<br />
  MENU LABEL ^9. Windows 98 SE Boot Disk<br />
  kernel syslinux/memdisk<br />
  append initrd=winb98se.img</p>
<p>LABEL cpuid<br />
        MENU LABEL ^A. Identify Processor<br />
        KERNEL syslinux/cpuidtest.c32
</p></blockquote>
<p><b>Screenphotos</b></p>
<p>(click images to see in full size))</p>
<p>
Text boot using <i>menu.c32</i> (or when <i>vesamenu.c32</i> gets wrong options, files like background image in wrong size (needs to be 640&#215;480)).
</p>
<p>
<a class="imagelink" href="http://readme.maven.pl/wp-content/uploads/2007/01/rba-text.jpg" title="Text boot"><img id="image34" src="http://readme.maven.pl/wp-content/uploads/2007/01/rba-text.thumbnail.jpg" alt="Text boot" /></a>
</p>
<p>
Graphical boot with PLD-style background image.
</p>
<p>
<a class="imagelink" href="http://readme.maven.pl/wp-content/uploads/2007/01/rba-graph.jpg" title="Graphical boot"><img id="image32" src="http://readme.maven.pl/wp-content/uploads/2007/01/rba-graph.thumbnail.jpg" alt="Graphical boot" /></a>
</p>
<p>
You can change boot options just like in grub.
</p>
<p>
<a class="imagelink" href="http://readme.maven.pl/wp-content/uploads/2007/01/rba-graph-edit.jpg" title="Graphical boot with editing parameters for single boot entry"><img id="image31" src="http://readme.maven.pl/wp-content/uploads/2007/01/rba-graph-edit.thumbnail.jpg" alt="Graphical boot with editing parameters for single boot entry" /></a>
</p>
<p>
PLD RescueCD boots&#8230;
</p>
<p>
<a class="imagelink" href="http://readme.maven.pl/wp-content/uploads/2007/01/rba-rescue-boot.jpg" title="Booting PLD RescueCD"><img id="image33" src="http://readme.maven.pl/wp-content/uploads/2007/01/rba-rescue-boot.thumbnail.jpg" alt="Booting PLD RescueCD" /></a>
</p>
<p>
Windows 98 SE image already started.
</p>
<p>
<a class="imagelink" href="http://readme.maven.pl/wp-content/uploads/2007/01/rba-win.jpg" title="Booting Windows 98 SE floppy image"><img id="image35" src="http://readme.maven.pl/wp-content/uploads/2007/01/rba-win.thumbnail.jpg" alt="Booting Windows 98 SE floppy image" /></a>
</p>
<p>
Example of CPU Identification that comes with syslinux package.
</p>
<p>
<a class="imagelink" href="http://readme.maven.pl/wp-content/uploads/2007/01/rba-cpuid.jpg" title="CPU Identification example"><img id="image30" src="http://readme.maven.pl/wp-content/uploads/2007/01/rba-cpuid.thumbnail.jpg" alt="CPU Identification example" /></a>
</p>
<p>Background image used in screenshots</p>
<p>
<a class="imagelink" href="http://readme.maven.pl/wp-content/uploads/2007/01/pld-background.png" title="PLD Background"><img id="image36" src="http://readme.maven.pl/wp-content/uploads/2007/01/pld-background.thumbnail.png" alt="PLD Background" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://readme.maven.pl/2007/01/13/pxe-remote-boot-for-your-homework-lab/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>AppArmor protection for your Apache (including mod_php, mod_python and others)</title>
		<link>http://readme.maven.pl/2006/12/13/apparmor-protection-for-your-apache-including-mod_php-mod_python-and-others/</link>
		<comments>http://readme.maven.pl/2006/12/13/apparmor-protection-for-your-apache-including-mod_php-mod_python-and-others/#comments</comments>
		<pubDate>Wed, 13 Dec 2006 17:51:04 +0000</pubDate>
		<dc:creator>arekm</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.maven.pl/?p=28</guid>
		<description><![CDATA[The biggest weak of Apache httpd web server is lack of security when using it in multiuser enviroment. All httpd processes run under the same UID and GID which means that user JOE can create simple php script which when run via httpd will be able to open and read other users web files (which means that other users database passwords hidden somewhere in web configuration files are not protected). [...]]]></description>
			<content:encoded><![CDATA[<p>The biggest weak of Apache httpd web server is lack of security when using it in multiuser enviroment.<br />
All   httpd processes run under the same UID and GID which means that user JOE can create simple<br />
php script which when run via httpd will be able to open and read other users web files (which means<br />
that other users database passwords hidden somewhere in web configuration files are not protected).</p>
<p>There are some ways to protect your files:<span id="more-28"></span></p>
<ul>
<li>FastCGI (mainly for PHP; allows to run php scripts under different privileges)</li>
<li>CGI (running PHP and other scripts through suexec)</li>
<li>nonstandard apache MPMs like peruser, metuxmpm (allow to run parts of httpd with different UID/GID; unfortunately very alpha quality)</li>
</ul>
<p>The primary problem with all above is that performance drops dramaticly.</p>
<p>That&#8217;s where <a href="http://forge.novell.com/modules/xfmod/project/?apparmor" title="AppArmor">AppArmor</a> comes to a rescue.<br />
AppArmor is kind of SuSE response to <a href="http://www.nsa.gov/selinux/" title="SELinux">SELinux</a>. SELinux is preety good<br />
when it comes to creating fine grained policy rules but tends to be quite complicated when it comes to writting policies for programs.<br />
The AppArmor on the other hand is much simpler but also quite limited. AppArmor can be used to restrict file and capabilities(7)<br />
access only. That&#8217;s enough for us - we want exactly that - limit access to parts of filesystem. <br />
The primary reason why we choose AppArmor over SELinux here is the ,,change hat&#8221; functionality.<br />
It allows to define subpolicies for a program and the program is able to switch between subpolicies.<br />
apache-mod_apparmor allows to switch subpolicy on per virtual host, directory and location basis!<br />
<a href="http://www.nsa.gov/selinux/" title="SELinux"><br />
</a>How to do that?<br />
<a href="http://www.nsa.gov/selinux/" title="SELinux"><br />
</a>First you need to patch you kernel with apparmor patches (these are very small and non-intrusive);<br />
most of AppArmor lives in separate directory in kernel tree: security/apparmor so it&#8217;s not conflicting<br />
even with grsecurity patches. You will also need to download and build apparmor-parser, apparmor-profiles<br />
and apparmor-utils packages. All these available on <a href="http://forge.novell.com/modules/xfmod/project/?apparmor" title="AppArmor Home Page">AppArmor Home Page</a>.</p>
<p>AppArmor keeps policy files in /etc/apparmor.d/. These are simple text files, for example /etc/apparmor.d/usr.sbin.httpd.prefork policy:</p>
<blockquote><p># vim:syntax=apparmor<br />
# Last Modified: Tue Dec 12 02:37:27 2006<br />
#include &lt;tunables/global><br />
/usr/sbin/httpd.prefork flags=(complain) {<br />
#include &lt;abstractions/base><br />
#include &lt;abstractions/nameservice><br />
/usr/sbin/httpd.prefork mr,<br />
capability setuid,<br />
capability setgid,<br />
capability kill,<br />
capability dac_override,<br />
capability dac_read_search,</p>
<p>/etc/httpd/apache.conf r,<br />
/etc/httpd/conf.d r,<br />
/etc/httpd/conf.d/* r,<br />
/etc/httpd/ssl/* r,<br />
/usr/lib{,64}/apache/*.so mr,<br />
/etc/httpd/webapps.d r,<br />
/etc/gai.conf r,<br />
/etc/httpd/magic r,<br />
/etc/mime.types r,<br />
/usr/share/file/magic* r,<br />
/etc/openssl/** r,</p>
<p>/var/log/httpd/** w,<br />
/var/log/archive/httpd/* w,</p>
<p>/etc/php4/** r,<br />
/usr/lib{,64}/php4/*.so mr,<br />
/etc/php/** r,<br />
/usr/lib{,64}/php/*.so mr,</p>
<p>/var/run/httpd.pid rw,<br />
/var/run/httpd/** rw,</p>
<p>/proc/[0-9]*/attr/current rw,<br />
/etc/snmp/** r,<br />
/usr/share/snmp/** r,</p>
<p>/usr/share/perl5/** r,<br />
/usr/lib{,64}/perl5/** r,<br />
/usr/lib{,64}/perl5/**.so* mr,</p>
<p>/usr/X11R6/lib{,64}/lib*.so* mr,</p>
<p>^HANDLING_UNTRUSTED_INPUT flags=(complain) {<br />
/home/services/httpd/** r,<br />
/var/log/httpd/** w,<br />
/var/log/archive/httpd/* w,<br />
/home/users/**/.htaccess r,<br />
}</p>
<p>^HAT_no_access flags=(complain) {<br />
/home/services/httpd/** r,<br />
/var/log/httpd/** w,<br />
/var/log/archive/httpd/* w,<br />
}</p>
<p>#include &lt;abstractions/httpd-users><br />
}
</p></blockquote>
<p><i><strong>r</strong> &#8211; read, <strong>w</strong> &#8211; write, <strong>ix</strong> &#8211; inherited policy on execution, <strong>*</strong> &#8211; simple globbing, <strong>**</strong> &#8211; glob that also matches slash character</i> (there is more of these of course &#8211; see man apparmor.d(5) for details).</p>
<p>HANDLING_UNTRUSTED_INPUT and HAT_no_access are HATs configuration (HAT is previously mentioned subpolicy). By default mod_apparmor runs in HANDLING_UNTRUSTED_INPUT hat. That hat can be changed from configuration file for example:</p>
<blockquote><p>
AADefaultHatName HAT_no_access</p>
<p>&lt;VirtualHost vhost.domain.org><br />
AADefaultHatName HAT_domain_org<br />
[...]<br />
&lt;/VirtualHost></p>
<p>&lt;VirtualHost vhost.other-domain.com><br />
AADefaultHatName HAT_other_domain_com<br />
[...]<br />
&lt;/VirtualHost></p>
</blockquote>
<p>will cause that mod_apparmor sets appropriate hat on per virtual host basis (as mentioned earlier we can use AADefaultHatName in Location and Directory directives, too).</p>
<p>Now we need to sets policies for these new vhost hats, but first we will put common rules into single abstraction/httpd-hat file that later will be used in HAT policies:</p>
<blockquote><p>
 #include &lt;abstractions/base></p>
<p>  capability setuid,<br />
  capability setgid,</p>
<p>  /proc/[0-9]*/mounts r,<br />
  /proc/filesystems r,</p>
<p>  /home/services/httpd/** r,<br />
  /var/log/httpd/** w,<br />
  /var/log/archive/httpd/* w,</p>
<p>  /usr/lib{,64}/perl5/** r,<br />
  /usr/lib{,64}/perl5/**.so* mr,</p>
<p>  /etc/mysql/mysql-client.conf r,<br />
  /etc/services r,<br />
  /etc/protocols r,<br />
  /etc/nsswitch.conf r,<br />
  /etc/hosts r,<br />
  /etc/host.conf r,<br />
  /etc/resolv.conf r,<br />
  /etc/mtab r,<br />
  /etc/fstab r,<br />
  /etc/xml/* r,<br />
  /etc/fonts/** r,</p>
<p>  /usr/share/** r,</p>
<p>  /var/cache/fontconfig/* r,<br />
  /var/run/php r,<br />
  /var/run/php/** rw,<br />
  /var/run/nscd/socket rw,<br />
  /tmp r,<br />
  /tmp/** rwl,</p>
<p>  /bin/* ixr,<br />
  /usr/bin/* ixr,</p>
<p>  /usr/lib{,64}/lib*.so* mr,<br />
  /usr/X11R6/lib{,64}/lib*.so* mr,</p>
<p>  /usr/lib{,64}/ImageMagick-** r,<br />
  /usr/lib{,64}/ImageMagick-**.so* mr,
</p></blockquote>
<p>and finally HAT policies in abstractions/httpd-users:</p>
<blockquote><p>
  ^HAT_domain_org {<br />
    #include &lt;abstractions/httpd-hat><br />
    /home/users/web-pages/domain_org rw,<br />
    /home/users/web-pages/domain_org/** rw,<br />
    /home/users/web-pages/domain_org/cgi-bin/** ixrw,<br />
  }</p>
<p>  ^HAT_other_domain_com {<br />
    #include &lt;abstractions/httpd-hat><br />
    /home/users/web-pages/other_domain_com rw,<br />
    /home/users/web-pages/other_domain_com/** rw,<br />
    /home/users/web-pages/other_domain_com/cgi-bin/** ixrw,<br />
  }</p>
</blockquote>
<p>That&#8217;s all. We load policy using rcapparmor init script (/etc/rc.d/init.d/apparmor in PLD/Linux). We can put profile into complain mode (everything is logged but no restriction is in effect) or in enforce mode (apparmor will enforce profile and log rejects). Example /var/log/audit/audit.log:</p>
<blockquote><p>
type=UNKNOWN[1500] msg=audit(1166014976.862:130983): REJECTING r access to /var/cache/fontconfig/2ee5dd3f6641dbe23533346fa3fce51a-x86-64.cache-2 (convert(13663) pro<br />
file /usr/sbin/httpd.prefork active HAT_domain_org)<br />
type=UNKNOWN[1500] msg=audit(1166015781.907:130984): REJECTING r access to /etc/fonts/conf.avail/20-fix-globaladvance.conf (convert(17219) profile /usr/sbin/httpd.p<br />
refork active HAT_domain_org)<br />
type=UNKNOWN[1500] msg=audit(1166015781.907:130985): REJECTING r access to /etc/fonts/conf.avail/20-lohit-gujarati.conf (convert(17219) profile /usr/sbin/httpd.pref<br />
ork active HAT_domain_org)<br />
[...]<br />
type=UNKNOWN[1500] msg=audit(1166016116.536:131037): REJECTING r access to /var/cache/fontconfig/2ee5dd3f6641dbe23533346fa3fce51a-x86-64.cache-2 (convert(17596) pro<br />
file /usr/sbin/httpd.prefork active HAT_other_domain_com)<br />
type=UNKNOWN[1500] msg=audit(1166016139.393:131038): REJECTING r access to /var/tmp (httpd.prefork(7442) profile /usr/sbin/httpd.prefork active HAT_other_domain_com)<br />
type=UNKNOWN[1500] msg=audit(1166016139.405:131039): REJECTING r access to /var/tmp (httpd.prefork(7442) profile /usr/sbin/httpd.prefork active HAT_other_domain_com)<br />
type=UNKNOWN[1500] msg=audit(1166016139.429:131040): REJECTING r access to /var/tmp (httpd.prefork(7442) profile /usr/sbin/httpd.prefork active HAT_other_domain_com)
</p></blockquote>
<p>This log file is very usefull when creating policy (of course apparmor provides some tools that will create policy for you by parsing log file but I was doing everything manually with vim in one hand and tail in second).</p>
<p>Note that .htaccess checking is done at HANDLING_UNTRUSTED_INPUT level, before vhost HAT is applied.</p>
<p>ps. you will probably need to pass <em>capability.disable=1 selinux=off</em> when booting kernel. Otherwise apparmor won&#8217;t even load.</p>
]]></content:encoded>
			<wfw:commentRss>http://readme.maven.pl/2006/12/13/apparmor-protection-for-your-apache-including-mod_php-mod_python-and-others/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Jabra BT-500 Bluetooth Headset and Linux</title>
		<link>http://readme.maven.pl/2006/04/27/jabra-bt-500-bluetooth-headset-and-linux/</link>
		<comments>http://readme.maven.pl/2006/04/27/jabra-bt-500-bluetooth-headset-and-linux/#comments</comments>
		<pubDate>Thu, 27 Apr 2006 18:12:49 +0000</pubDate>
		<dc:creator>arekm</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.maven.pl/?p=22</guid>
		<description><![CDATA[BT500 works quite well when paired with Linux. To get the thing working you will need BlueZ stack (already in recent kernels), utilities (bluez-utils.spec) and ALSA Bluetooth driver &#8211; snd-bt-sco. There is one issue with BT500 (where you will hear no sound, just single beep at start and end of audio stream) which is handled by sco-mtu patch. After setting headset in paring mode issue: [root@tarm ~]# hcitool inq Inquiring &#8230; 00:07:A4:BE:95:EE clock offset: [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.jabra.com/JabraCMS/NA/EN/MainMenu/Support/WirelessHeadsets/JabraBT500/" title="BT 500 Bluetooth Headset">BT500</a> works quite well when paired with Linux. To get the thing working you will need <a href="http://www.bluez.org/" title="BlueZ stack">BlueZ</a> stack (already in recent kernels), utilities (<a href="http://cvs.pld-linux.org/SPECS/bluez-utils.spec" title="BlueZ Utils from PLD">bluez-utils.spec</a>) and ALSA Bluetooth driver &#8211; <a href="http://bluetooth-alsa.sourceforge.net/" title="Bluetooth ALSA driver">snd-bt-sco</a>. There is one issue with BT500 (where you will hear no sound, just single beep at start and end of audio stream) which is handled by <a href="http://bluetooth-alsa.sourceforge.net/sco-mtu.patch" title="Fixes problem with some Bluetooth headsets">sco-mtu patch</a>.</p>
<p>After setting headset in paring mode issue:</p>
<blockquote><p><em>[root@tarm ~]# hcitool inq</em><em><br />
</em><em>Inquiring &#8230;</em><em><br />
</em><em>00:07:A4:BE:95:EE       clock offset: 0x51ed    class: 0&#215;200404</em></p></blockquote>
<p>Then pair with bt500:</p>
<blockquote><p><em>[root@tarm ~]# hcitool cc 00:07:A4:BE:95:EE</em><em><br />
</em><em>[root@tarm ~]#</em></p></blockquote>
<p>you will be asked for PIN code (enter: 0000).</p>
<blockquote><p><em>[root@tarm ~]# btsco -v 00:07:A4:BE:95:EE</em><em><br />
</em><em>btsco v0.41</em><em><br />
</em><em>Device is 1:0</em><em><br />
</em><em>Voice setting: 0&#215;0060</em><em><br />
</em><em>RFCOMM channel 1 connected</em><em><br />
</em><em>recieved AT*GNMK</em></p></blockquote>
<p>From now one there should be second ALSA card available:</p>
<blockquote><p><em>[root@tarm ~]# cat /proc/asound/cards</em><em><br />
</em><em>0 [Intel          ]: HDA-Intel &#8211; HDA Intel</em><em><br />
</em><em>HDA Intel at 0xb0000000 irq 169</em><em><br />
</em><em>1 [Headset        ]: Bluetooth SCO &#8211; BT Headset</em><em><br />
</em><em>BT Headset 1</em></p></blockquote>
<p>Run your favorite application (<a href="http://www.twinklephone.com/" title="SIP Phone for Linux (GPL)">twinkle</a> perhaps &#8211; very nice SIP phone with G.711 support, ideal for connecting to <a href="http://www.asterisk.org/" title="Asterisk PBX">Asterisk PBX</a>) and choose BT Headset in sound setup (available also trough OSS emulation as /dev/dsp1 in my case).</p>
<p>You can view setting using alsamixer or amixer using<strong> -c 1</strong> switch:</p>
<blockquote><p><em>[root@tarm ~]# amixer -c 1</em><em><br />
</em><em>Simple mixer control &#8216;Master&#8217;,0</em><em><br />
</em><em>Capabilities: volume volume-joined</em><em><br />
</em><em>Playback channels: Mono</em><em><br />
</em><em>Capture channels: Mono</em><em><br />
</em><em>Limits: 0 &#8211; 15</em><em><br />
</em><em>Mono: 0 [0%]</em><em><br />
</em><em>Simple mixer control &#8216;Mic&#8217;,0</em><em><br />
</em><em>Capabilities: volume volume-joined</em><em><br />
</em><em>Playback channels: Mono</em><em><br />
</em><em>Capture channels: Mono</em><em><br />
</em><em>Limits: 0 &#8211; 15</em><em><br />
</em><em>Mono: 0 [0%]</em><em><br />
</em><em>Simple mixer control &#8216;AGC&#8217;,0</em><em><br />
</em><em>Capabilities: pswitch pswitch-joined</em><em><br />
</em><em>Playback channels: Mono</em><em><br />
</em><em>Mono: Playback [off]</em><em><br />
</em><em>Simple mixer control &#8216;Loopback&#8217;,0</em><em><br />
</em><em>Capabilities: pswitch pswitch-joined</em><em><br />
</em><em>Playback channels: Mono</em><em><br />
</em><em>Mono: Playback [off]</em></p></blockquote>
<p>When pressing buttons on headset the commands are sent to Bluetooth dongle and are visible by btsco program. You can  put your own   script in .btscorc which will be executed when commands arrive. By this method you can for example connect hang up button on headset with skype disconnect button (through skype DBUS API).</p>
]]></content:encoded>
			<wfw:commentRss>http://readme.maven.pl/2006/04/27/jabra-bt-500-bluetooth-headset-and-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Suspend to RAM on IBM ThinkPad Z60m with SATA drive</title>
		<link>http://readme.maven.pl/2006/04/23/suspend-to-ram-on-ibm-thinkpad-z60m-with-sata-drive/</link>
		<comments>http://readme.maven.pl/2006/04/23/suspend-to-ram-on-ibm-thinkpad-z60m-with-sata-drive/#comments</comments>
		<pubDate>Sun, 23 Apr 2006 08:53:30 +0000</pubDate>
		<dc:creator>arekm</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.maven.pl/?p=21</guid>
		<description><![CDATA[Suspend on this laptop works quite well beside one important thing &#8211; SATA driver (ata_piix). It doesn&#8217;t resume properly, scsi subsystem timeouts, filesystem reports errors and the whole fs is remounted read only. Recently Hugh Dickins found a way to make resume reliable: http://lkml.org/lkml/2006/4/21/303 Apply it to latest kernel (2.6.17rc2 in my case) and use [...]]]></description>
			<content:encoded><![CDATA[<p>Suspend on this laptop works quite well beside one important thing &#8211; SATA driver (ata_piix). It doesn&#8217;t resume properly, scsi subsystem timeouts, filesystem reports errors and the whole fs is remounted read only.</p>
<p>Recently Hugh Dickins found a way to make resume reliable:<br />
<a href="http://lkml.org/lkml/2006/4/21/303" title="resume from sata">http://lkml.org/lkml/2006/4/21/303<br />
</a><br />
Apply it to latest kernel (2.6.17rc2 in my case) and use <a href="http://suspend.sf.net" title="userspace suspend">suspend userspace tool</a> s2ram.</p>
<p>It isn&#8217;t best way (patch violates layers in libata driver) but that&#8217;s all. It&#8217;s usable until  clean solution is found.</p>
]]></content:encoded>
			<wfw:commentRss>http://readme.maven.pl/2006/04/23/suspend-to-ram-on-ibm-thinkpad-z60m-with-sata-drive/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

