<?xml version="1.0"?>
<rss version="2.0">

<channel>
	<title>Planet Exherbo</title>
	<link>http://planet.exherbo.org/</link>
	<language>en</language>
	<description>Planet Exherbo - http://planet.exherbo.org/</description>

<item>
	<title>Ciaran McCreesh: Paludis 0.44.2 Released</title>
	<guid>http://ciaranm.wordpress.com/?p=749</guid>
	<link>http://ciaranm.wordpress.com/2010/03/07/paludis-0-44-2-released/</link>
	<description>&lt;p&gt;&lt;a href=&quot;http://paludis.pioto.org/&quot;&gt;Paludis&lt;/a&gt; 0.44.2 has been released:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Various documentation updates.&lt;/li&gt;
&lt;li&gt;When disambiguating a spec like foo::bar, where cat-1/pkg::foo and cat-2/pkg::bar exist, we now recognise that you must want cat-2.&lt;/li&gt;
&lt;li&gt;A bug causing NoConfig clients to fail to find profiles when used with a supplemental repository that does not provide its own profiles description has been fixed.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;Filed under: &lt;a href=&quot;http://ciaranm.wordpress.com/category/paludis/paludis-releases/&quot;&gt;paludis releases&lt;/a&gt; Tagged: &lt;a href=&quot;http://ciaranm.wordpress.com/tag/paludis/&quot;&gt;paludis&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gocomments/ciaranm.wordpress.com/749/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/comments/ciaranm.wordpress.com/749/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godelicious/ciaranm.wordpress.com/749/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/delicious/ciaranm.wordpress.com/749/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gostumble/ciaranm.wordpress.com/749/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/stumble/ciaranm.wordpress.com/749/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godigg/ciaranm.wordpress.com/749/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/digg/ciaranm.wordpress.com/749/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/goreddit/ciaranm.wordpress.com/749/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/reddit/ciaranm.wordpress.com/749/&quot; /&gt;&lt;/a&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://stats.wordpress.com/b.gif?host=ciaranm.wordpress.com&amp;blog=3715284&amp;post=749&amp;subd=ciaranm&amp;ref=&amp;feed=1&quot; /&gt;</description>
	<pubDate>Sun, 07 Mar 2010 13:18:21 +0000</pubDate>
</item>
<item>
	<title>Bryan Østergaard: Exherbo at Open Source Days</title>
	<guid>http://kloeri.livejournal.com/13337.html</guid>
	<link>http://kloeri.livejournal.com/13337.html</link>
	<description>The danish open source conference, &lt;a href=&quot;http://www.opensourcedays.org/2010/&quot;&gt;Open Source Days&lt;/a&gt;, will run this friday and saturday. &lt;a href=&quot;http://www.exherbo.org/&quot;&gt;Exherbo&lt;/a&gt; will be present both days with quite a few developers in attendance.&lt;br /&gt;&lt;br /&gt;I'm sure there will be a (little) hacking on &lt;a href=&quot;http://www.exherbo.org&quot;&gt;Exherbo&lt;/a&gt; and related projects like &lt;a href=&quot;http://kloeri.livejournal.com/12774.html&quot;&gt;Genesis&lt;/a&gt; but it's also a very good, if somewhat rare, opportunity to meet some of the leading &lt;a href=&quot;http://www.exherbo.org/developers.html&quot;&gt;Exherbo developers&lt;/a&gt; and talk to them about the current status of Exherbo and what's in the future.&lt;br /&gt;&lt;br /&gt;Personally I'm hoping to have some good discussions about the kind of problems people currently face when they use Linux in various business settings and ways that those problems might be solved. I'm also hoping that you can learn something from the way the Exherbo project is managed and get an idea how the project manages to move at such a fast pace.&lt;br /&gt;&lt;br /&gt;And finally I'm looking forward to meeting lots of people and having a good time :)</description>
	<pubDate>Thu, 04 Mar 2010 00:29:58 +0000</pubDate>
</item>
<item>
	<title>Bryan Østergaard: On Genesis commits</title>
	<guid>http://kloeri.livejournal.com/13151.html</guid>
	<link>http://kloeri.livejournal.com/13151.html</link>
	<description>I've been asked a few times by different people whether they should push simple patches to genesis. The answer is a resounding 'Yes, please go ahead' but it seems like stating my policy towards other peoples contributions might not go entirely amiss.&lt;br /&gt;&lt;br /&gt;My current policy (which will stay until genesis starts stabilising a lot more) is:&lt;ul&gt;&lt;li&gt;Any contribution is welcome so you just need to find somebody with push access (the usual Exherbo devs will do)&lt;/li&gt;&lt;li&gt;Large patches /&amp;nbsp;feature contributions are also extremely welcome but you might want to  contact me first and make sure I won't undo you hard work.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;I'm not in any case going to complain about contributions (large or small)&amp;nbsp;so don't hold back. And remember that I have a pressing need for people to play around with genesis scripts and tell me what you need from genesis. git://git.exherbo.org/genesis-scripts.git was created yesterday for this purpose.&lt;br /&gt;&lt;br /&gt;And for those of you who don't have direct push access you can just cue your patches using the hacchi patch bot in #exherbo on irc://chat.freenode.net and I'm sure one of the friendly exherbo developers will help you :)</description>
	<pubDate>Fri, 26 Feb 2010 15:42:11 +0000</pubDate>
</item>
<item>
	<title>Bryan Østergaard: Genesis just got internal events</title>
	<guid>http://kloeri.livejournal.com/12998.html</guid>
	<link>http://kloeri.livejournal.com/12998.html</link>
	<description>One of the big problems with Genesis was that you'd get its coldplugging events in that the events wasn't necessarily delivered in a sane order. I briefly considered different ways of controlling the order of the events but quickly came to the conclusion that was madness.&lt;br /&gt;&lt;br /&gt;The solution I decided upon instead is generating an internal event after coldplugging is finished and send that event to all event modules. This way we can simply trigger on the 'genesis-started' event and start mounting filesystems and whatever else is needed for bootup.&lt;br /&gt;&lt;br /&gt;So how can you help? What I need right now from you is just playing around with some homegrown scripts, trying to catch some events and telling me about all the things that are absolutely impossible to do without. Testing Genesis is quite simple and can easily be done without interfering with the rest of your system.&lt;br /&gt;&lt;br /&gt;How to test Genesis:&lt;br /&gt;1. Clone the git://git.exherbo.org/genesis.git repository&lt;br /&gt;2. Run ./autogen.sh in the genesis repository&lt;br /&gt;3. Run ./configure&lt;br /&gt;4. Run make&lt;div&gt;5. Run sudo make install (by default it installs to /usr/local and won't conflict with anything)&lt;/div&gt;&lt;div&gt;6. Write a /usr/local/etc/genesis/config file&lt;/div&gt;&lt;div&gt;My current config file looks like:&lt;/div&gt;&lt;pre&gt;

[genesis]
# Currently supported log destinations are file and console
logging = console
logfile = /var/log/genesis.log

[modules]
command = yes
netlink-uevent = yes
netlink-route = yes

[netlink-uevent]
coldplug = yes
coldplug_mounts_sysfs = no
log_matched_events = yes
log_unmatched_events = yes&lt;/pre&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;Ignore all the options except the coldplug_* options. The other options might be necessary due to the rather haphazard way configuration is implemented currently but don't expect them to work right now. The coldplug option enables/disables coldplug events and the coldplyg_mounts_sysfs option controls whether the coldplugging part tries to mount &lt;strong&gt;and umount /sys&lt;/strong&gt;. You want to keep this option disabled unless you're doing actual boot testing.&lt;br /&gt;&lt;br /&gt;Stick one or more bash scripts in /usr/local/etc/genesis/netlink-uevent/ or /usr/local/etc/genesis/netlink-route/ and try running: sudo /usr/local/sbin/genesis&lt;br /&gt;&lt;br /&gt;The test scripts I'm using currently looks like (from /usr/local/etc/genesis/netlink-uevent/foo.sh):&lt;br /&gt;&lt;br /&gt;SUBSCRIPTIONS_add=vcs10&lt;br /&gt;&lt;br /&gt;add()&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo &quot;netlink-uevent::add&quot; &amp;gt;&amp;gt; /var/tmp/genesis.log&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;You can add any number of event subscriptions you like in a single script or spread subscriptions over several scripts. Each subscription is defined as SUBSCRIPTION_function=trigger&lt;br /&gt;&lt;br /&gt;Trigger is simply a regex that matches the metadata from events in an internally serialized string format. Function denotes the function in the script called when matching that event. So all the above script does is triggering the add() function on all events matching the string 'vcs10'. Since I&amp;nbsp;have coldplugging enabled I'm guaranteed to see that event.&lt;br /&gt;&lt;br /&gt;And that's all there is to it.. One of the things high on my TODO list is to replace the regex matching with a udev like language where I can match on subsystem, MAC address or whatever other metadata events generate. I'd very much appreciate comments on what you think is needed in a simple language like that.</description>
	<pubDate>Thu, 25 Feb 2010 14:41:11 +0000</pubDate>
</item>
<item>
	<title>Bryan Østergaard: Remember Genesis? The oft mentioned new init system for Exherbo?</title>
	<guid>http://kloeri.livejournal.com/12774.html</guid>
	<link>http://kloeri.livejournal.com/12774.html</link>
	<description>If not you might want to read &lt;a href=&quot;http://lists.exherbo.org/pipermail/exherbo-dev/2008-March/000074.html&quot;&gt;this old exherbo-dev post&lt;/a&gt; to refresh your mind.&lt;br /&gt;&lt;br /&gt;Genesis started out as me being rather frustrated with current init systems and their huge failures. My basic idea was that all the different init systems fail badly at solving any real problems for system administrators and that it was about time fixing that situation.&lt;br /&gt;&lt;br /&gt;So as I started really thinking about the problems that init systems should solve I decided that writing a new init system from scratch was the approach..&lt;br /&gt;&lt;br /&gt;A short while later I discussed most of my ideas in &lt;a href=&quot;http://mirrors.dotsrc.org/blivklogere/foss_aalborg/2008/a_Linux_distribution_is_born--Bryan_Oestergaard--english--FOSS_Aalborg.mp4&quot;&gt;a talk at FOSS Aalborg&lt;/a&gt; and had a fair bit of positive feedback. It's worth noting that I haven't started writing any code at this point and consequently my problems hadn't started yet.&lt;br /&gt;&lt;br /&gt;When I did start writing code I quickly got even more ideas for Genesis and it became an even more ambitious project. And then it changed radically.. again and again.&lt;br /&gt;&lt;br /&gt;Due to all the changes and lack of direction I didn't want to publish the code and it was often compared to Duke Nukem Forever (for good reasons I might add). But now that I finally seem to be reasonably sure about the direction I've finally released &lt;a href=&quot;http://git.exherbo.org/?p=genesis.git;a=summary&quot;&gt;the code&lt;/a&gt; for everybody to peruse and contribute to.&lt;br /&gt;&lt;br /&gt;The current status of the code is quite messy and it's not yet usable as an init system at all. You can glean the basic ideas of it however and there's a TODO list that you're most welcome to take a swing at. A few people have already contributed some minor patches for the build system for which I am grateful. I'd get around to fixing those things myself but for now I'd rather focus more on Genesis design/architecture and make sure that development progresses quickly.&lt;br /&gt;&lt;br /&gt;As for progress I'm trying to make sure I do at least one Genesis commit every day and tracking that on http://calendaraboutnothing.com/~kloeri. Some days might only see very small commits but I'm shooting for larger, daily updates.&lt;br /&gt;&lt;br /&gt;My primary goals right now is getting Genesis to a state where it can boot a system as well as making the code more hacker friendly so more people can contribute.&lt;br /&gt;&lt;br /&gt;As for booting I expect to set up a separate git repository for genesis scripts as soon as Genesis is ready for that. It's my hope that most scripts will be contributed by other Exherbo contributors and that I can keep my focus on Genesis itself.</description>
	<pubDate>Wed, 24 Feb 2010 12:46:53 +0000</pubDate>
</item>
<item>
	<title>Ali Polatel: Batch tagging of audio files from the command line</title>
	<guid>http://alip.github.com//2010/01/27/batch-tagging-of-audio-files</guid>
	<link>http://alip.github.com//2010/01/27/batch-tagging-of-audio-files</link>
	<description>&lt;p&gt;As many of you know &lt;a href=&quot;http://en.wikipedia.org/wiki/MusicDNS&quot;&gt;MusicDNS&lt;/a&gt; is an acoustic fingerprinting service and a software development kit provided by MusicIP. The fingerprinting client library that looks up and identifies audio files based on existing fingerprints is called &lt;a href=&quot;http://code.google.com/p/musicip-libofa/&quot;&gt;libofa&lt;/a&gt;. &lt;a href=&quot;http://musicbrainz.org/&quot;&gt;MusicBrainz&lt;/a&gt; has a great audio tagger called &lt;a href=&quot;http://musicbrainz.org/doc/MusicBrainz_Picard&quot;&gt;Picard&lt;/a&gt; which can tag audio files by querying this &lt;a href=&quot;http://en.wikipedia.org/wiki/MusicDNS&quot;&gt;MusicDNS&lt;/a&gt; service.&lt;/p&gt;

&lt;p&gt;There is, however, a simple problem. &lt;a href=&quot;http://musicbrainz.org/doc/MusicBrainz_Picard&quot;&gt;Picard&lt;/a&gt; is a &lt;a href=&quot;http://en.wikipedia.org/wiki/Graphical_user_interface&quot;&gt;GUI&lt;/a&gt; and thus doesn&amp;#8217;t allow batch tagging of audio files from command line.&lt;/p&gt;

&lt;p&gt;Hence I decided to write my own tool for generating acoustic fingerprints and for querying &lt;a href=&quot;http://en.wikipedia.org/wiki/MusicDNS&quot;&gt;MusicDNS&lt;/a&gt; service. I&amp;#8217;ve chosen to use &lt;a href=&quot;http://www.mega-nerd.com/libsndfile/&quot;&gt;libsndfile&lt;/a&gt; to do the decoding as &lt;a href=&quot;http://code.google.com/p/musicip-libofa/&quot;&gt;libofa&lt;/a&gt; expects raw audio data. &lt;a href=&quot;http://www.mega-nerd.com/libsndfile/&quot;&gt;libsndfile&lt;/a&gt; is a C library for reading and writing files containing sampled sound through one standard library interface. It&amp;#8217;s pretty easy to use and its &lt;a href=&quot;http://en.wikipedia.org/wiki/API&quot;&gt;API&lt;/a&gt; hides most of the low-level details from the programmer.&lt;/p&gt;

&lt;p&gt;The tool is named &lt;a href=&quot;http://github.com/alip/afprint&quot;&gt;afprint&lt;/a&gt;, released under &lt;a href=&quot;http://en.wikipedia.org/wiki/GPLv2#Version_2&quot;&gt;GPLv2&lt;/a&gt;. Following the &lt;a href=&quot;http://en.wikipedia.org/wiki/Unix&quot;&gt;UNIX&lt;/a&gt; philosophy it just does one thing, calculation of acoustic fingerprint and duration of the given audio file.&lt;/p&gt;

&lt;p&gt;Usage is simple:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;alip@harikalardiyari&amp;gt; afprint -h
afprint-0.1.0-7b17577 audio fingerprinting tool
Usage: afprint [-hVv0] &amp;lt;infile&amp;gt;

Options:
    -h, --help      Display usage and exit
    -V, --version   Display version and exit
    -v, --verbose   Be verbose
    -0, --print0    Delimit path and fingerprint by null character instead of space
If &amp;lt;infile&amp;gt; is '-' afprint reads from standard input.
alip@harikalardiyari&amp;gt; afprint -v sample.ogg
[dump_print.294] Format: OGG (OGG Container format)
[dump_print.295] Frames: 2188368
[dump_print.296] Channels: 1
[dump_print.297] Samplerate: 44100Hz
[dump_print.298] Duration: 49735ms
[dump_print.302] essential frames: 5953500 &amp;gt; frames: 2188368, adjusting
sample.ogg 49735 ARaJDAgL...&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;a href=&quot;http://github.com/alip/afprint&quot;&gt;afprint&lt;/a&gt; decodes the audio data using &lt;a href=&quot;http://www.mega-nerd.com/libsndfile/&quot;&gt;libsndfile&lt;/a&gt; and feeds it to &lt;a href=&quot;http://code.google.com/p/musicip-libofa/&quot;&gt;libofa&lt;/a&gt;. It also calculates the duration of the audio file and prints them in format: &lt;code&gt;FILENAME DURATION FINGERPRINT&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Reading from standard input is tricky because pipes aren&amp;#8217;t seekable thus it&amp;#8217;s not possible to calculate the duration of the audio file. For this reason, when the audio data is fed via standard input, when &lt;code&gt;&amp;lt;infile&amp;gt;&lt;/code&gt; is &lt;code&gt;-&lt;/code&gt;, &lt;a href=&quot;http://github.com/alip/afprint&quot;&gt;afprint&lt;/a&gt; saves this data into a temporary file and reads from it. This makes it possible to calculate acoustic fingerprints of &lt;a href=&quot;http://en.wikipedia.org/wiki/Mp3&quot;&gt;Mp3&lt;/a&gt; files, which &lt;a href=&quot;http://www.mega-nerd.com/libsndfile/&quot;&gt;libsndfile&lt;/a&gt; doesn&amp;#8217;t &lt;a href=&quot;http://www.mega-nerd.com/libsndfile/FAQ.html#Q020&quot;&gt;support&lt;/a&gt;, easily.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;alip@harikalardiyari&amp;gt; mpg123 -q --au - 01_san_francisco.mp3|afprint -v -
[wav.c:388] warning: Cannot rewind AU file. File-format isn't fully conform now.
[wav.c:388] warning: Cannot rewind AU file. File-format isn't fully conform now.
[dump_print.294] Format: AU (Sun/NeXT)
[dump_print.295] Frames: 8000111
[dump_print.296] Channels: 2
[dump_print.297] Samplerate: 44100Hz
[dump_print.298] Duration: 181820ms
/dev/stdin.au 181820 AQMZN...&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Note the &lt;code&gt;--au&lt;/code&gt; option passed to &lt;a href=&quot;http://www.mpg123.de/&quot;&gt;mpg123&lt;/a&gt; as &lt;code&gt;--wav&lt;/code&gt; doesn&amp;#8217;t work.&lt;/p&gt;

&lt;p&gt;So far so good, now we need a tool to query the &lt;a href=&quot;http://en.wikipedia.org/wiki/MusicDNS&quot;&gt;MusicDNS&lt;/a&gt; server to find out the &lt;a href=&quot;http://en.wikipedia.org/wiki/Portable_Unique_IDentifier&quot;&gt;PUID&lt;/a&gt; of the audio file and query &lt;a href=&quot;http://musicbrainz.org/&quot;&gt;MusicBrainz&lt;/a&gt; to get the audio tags.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;ve written a simple &lt;a href=&quot;http://www.perl.org/&quot;&gt;Perl&lt;/a&gt; script to do the job. The script, which has the name &lt;a href=&quot;http://github.com/alip/afprint/blob/master/scripts/puidlookup.in&quot;&gt;puidlookup&lt;/a&gt;, reads audio fingerprints from standard input and queries the &lt;a href=&quot;http://en.wikipedia.org/wiki/MusicDNS&quot;&gt;MusicDNS&lt;/a&gt; server. Optionally it can query &lt;a href=&quot;http://musicbrainz.org/&quot;&gt;MusicBrainz&lt;/a&gt; as well to receive the tags.&lt;/p&gt;

&lt;p&gt;Here are the requirements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.perl.org&quot;&gt;Perl&lt;/a&gt; (obviously)&lt;/li&gt;

&lt;li&gt;&lt;a href=&quot;http://search.cpan.org/~gaas/libwww-perl/&quot;&gt;libwww-perl&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href=&quot;http://search.cpan.org/~grantm/XML-Simple/&quot;&gt;XML-Simple&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href=&quot;http://search.cpan.org/~bfaist/WebService-MusicBrainz/&quot;&gt;WebService-MusicBrainz&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href=&quot;http://search.cpan.org/~jhi/Time-HiRes/&quot;&gt;Time-HiRes&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Usage is simple, just pipe &lt;a href=&quot;http://github.com/alip/afprint&quot;&gt;afprint&lt;/a&gt;&amp;#8217;s output to &lt;a href=&quot;http://github.com/alip/afprint/blob/master/scripts/puidlookup.in&quot;&gt;puidlookup&lt;/a&gt;.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;alip@harikalardiyari&amp;gt; puidlookup -h
Usage: puidlookup [-hVv0]
    -h, --help          Display usage and exit
    -V, --version       Display version and exit
    -v, --verbose       Be verbose
    -0, --null          Expect input is null delimited
    -m, --musicbrainz   Look up PUIDs from MusicBrainz
                        (requires WebService-MusicBrainz)
    -l, --limit         Limit results to the given number
puidlookup reads filename, duration and audio fingerprint from standard input&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The &lt;code&gt;--null&lt;/code&gt; option responds to &lt;a href=&quot;http://github.com/alip/afprint&quot;&gt;afprint&lt;/a&gt;&amp;#8217;s &lt;code&gt;--print0&lt;/code&gt; option. These options are useful if filenames have spaces or other weird characters in it.&lt;/p&gt;

&lt;p&gt;By default it only queries &lt;a href=&quot;http://en.wikipedia.org/wiki/MusicDNS&quot;&gt;MusicDNS&lt;/a&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;alip@harikalardiyari&amp;gt; afprint 04sheep.ogg | puidlookup
ARTIST='Pink Floyd'
TITLE='Sheep'
PUID=930806c1-e1e0-588a-b7de-2dacb1b8b11e&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The &lt;code&gt;--musicbrainz&lt;/code&gt; option can be used to query &lt;a href=&quot;http://musicbrainz.org/&quot;&gt;MusicBrainz&lt;/a&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;alip@harikalardiyari&amp;gt; afprint 04sheep.ogg | puidlookup --musicbrainz
PUID=930806c1-e1e0-588a-b7de-2dacb1b8b11e
TRACKID=431a85dd-e22b-4626-91c9-c0abb8058d3f
ARTISTID=83d91898-7763-47d7-b03b-b92132375c47
ARTIST='Pink Floyd'
TITLE='Sheep'
TRACK=4
ALBUM='Animals'&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The output is quoted so it&amp;#8217;s safe to pass to &lt;code&gt;eval&lt;/code&gt;, making it easy to integrate with shell scripts.&lt;/p&gt;

&lt;p&gt;Last step is writing a tagger script to tag audio files. I&amp;#8217;ve written a shell script called &lt;a href=&quot;http://github.com/alip/afprint/blob/master/scripts/ofatag&quot;&gt;ofatag&lt;/a&gt; which uses &lt;a href=&quot;http://github.com/alip/envtag&quot;&gt;envtag&lt;/a&gt;. It recognizes &lt;a href=&quot;http://en.wikipedia.org/wiki/Mp3&quot;&gt;Mp3&lt;/a&gt; files using the &lt;code&gt;file&lt;/code&gt; command and decodes using &lt;code&gt;mpg123&lt;/code&gt;, other formats are directly fed to &lt;a href=&quot;http://github.com/alip/afprint&quot;&gt;afprint&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now, to tag your files using MusicBrainz web services just do&lt;br /&gt;&lt;code&gt;ofatag /path/to/music/*.mp3 /path/to/music/*.ogg&lt;/code&gt;&lt;br /&gt;etc.&lt;/p&gt;

&lt;p&gt;I haven&amp;#8217;t released a version yet because it&amp;#8217;s all pretty new and needs testing. So please test it and report back! Any comments, thoughts, patches are appreciated.&lt;/p&gt;
&lt;!-- vim: set tw=80 ft=mkd spell spelllang=en sw=4 sts=4 et : --&gt;</description>
	<pubDate>Wed, 27 Jan 2010 08:00:00 +0000</pubDate>
</item>
<item>
	<title>Ali Polatel: sydbox-0.6.3</title>
	<guid>http://alip.github.com//2010/01/23/sydbox-0.6.3</guid>
	<link>http://alip.github.com//2010/01/23/sydbox-0.6.3</link>
	<description>&lt;p&gt;sydbox-0.6.3 is released. ( &lt;a href=&quot;http://dev.exherbo.org/~alip/sydbox/sydbox-0.6.3.tar.bz2&quot;&gt;tarball&lt;/a&gt;, &lt;a href=&quot;http://dev.exherbo.org/~alip/sydbox/sydbox-0.6.3.tar.bz2.asc&quot;&gt;sign&lt;/a&gt;, &lt;a href=&quot;http://dev.exherbo.org/~alip/sydbox/sydbox-0.6.3.tar.bz2.sha1sum&quot;&gt;sha1sum&lt;/a&gt; )&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Resolve path of non-abstract UNIX sockets&lt;/li&gt;

&lt;li&gt;Intercept dup family calls and fcntl calls to see if a socket descriptor we care about has been duplicated&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- vim: set tw=80 ft=mkd spell spelllang=en sw=4 sts=4 et : --&gt;</description>
	<pubDate>Sat, 23 Jan 2010 08:00:00 +0000</pubDate>
</item>
<item>
	<title>Ali Polatel: ptrace on BSD</title>
	<guid>http://alip.github.com//2010/01/16/ptrace-on-bsd</guid>
	<link>http://alip.github.com//2010/01/16/ptrace-on-bsd</link>
	<description>&lt;p&gt;&lt;code&gt;ptrace&lt;/code&gt; is a system call which is used for process tracing and debugging. This system call is available on many operating systems. However each operating system has different versions.&lt;/p&gt;

&lt;p&gt;I want to explain about my efforts to port &lt;a href=&quot;http://projects.0x90.dk/projects/show/sydbox&quot;&gt;sydbox&lt;/a&gt; to &lt;a href=&quot;http://www.freebsd.org/&quot;&gt;FreeBSD&lt;/a&gt;. The &lt;a href=&quot;http://www.freebsd.org/cgi/man.cgi?query=ptrace&amp;apropos=0&amp;sektion=0&amp;manpath=FreeBSD+8.0-RELEASE&amp;format=html&quot;&gt;ptrace implementation&lt;/a&gt; of &lt;a href=&quot;http://www.freebsd.org/&quot;&gt;FreeBSD&lt;/a&gt; is similar to &lt;a href=&quot;http://www.kernel.org/&quot;&gt;Linux&lt;/a&gt;&amp;#8217;. The request &lt;code&gt;PT_SYSCALL&lt;/code&gt; is available to stop the traced process at every system call and exit similar to &lt;code&gt;PTRACE_SYSCALL&lt;/code&gt; of &lt;a href=&quot;http://www.kernel.org/&quot;&gt;Linux&lt;/a&gt;. In addition to that &lt;a href=&quot;http://www.freebsd.org/&quot;&gt;FreeBSD&lt;/a&gt; has the requests &lt;code&gt;PT_TO_SCE&lt;/code&gt; and &lt;code&gt;PT_TO_SCX&lt;/code&gt; which stops the traced process &lt;strong&gt;only&lt;/strong&gt; at the beginning of system call entry or exit. This is a feature I really miss on Linux.&lt;/p&gt;

&lt;p&gt;There is, however, a big difference, I&amp;#8217;m inclined to call it a bug, about &lt;code&gt;ptrace&lt;/code&gt; on &lt;a href=&quot;http://www.freebsd.org/&quot;&gt;FreeBSD&lt;/a&gt;. When a traced process is stopped at the entry of a system call, there&amp;#8217;s no way to prevent the execution of this system call. On Linux this is done by changing the system call number to either something invalid like &lt;code&gt;0xbadca11&lt;/code&gt; or something harmless like &lt;code&gt;getpid&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://feeds.feedburner.com/code/ptrace-linux-deny.c&quot;&gt;Here&lt;/a&gt; is an example:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;c&quot;&gt;    &lt;span class=&quot;cm&quot;&gt;/* denying system calls using ptrace on Linux&lt;/span&gt;
&lt;span class=&quot;cm&quot;&gt;     */&lt;/span&gt;

&lt;span class=&quot;cp&quot;&gt;    #include &amp;lt;assert.h&amp;gt;&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;    #include &amp;lt;fcntl.h&amp;gt;&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;    #include &amp;lt;signal.h&amp;gt;&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;    #include &amp;lt;stdio.h&amp;gt;&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;    #include &amp;lt;stdlib.h&amp;gt;&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;    #include &amp;lt;unistd.h&amp;gt;&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;    #include &amp;lt;sys/reg.h&amp;gt;&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;    #include &amp;lt;sys/types.h&amp;gt;&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;    #include &amp;lt;sys/wait.h&amp;gt;&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;    #include &amp;lt;sys/ptrace.h&amp;gt;&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;    #include &amp;lt;linux/ptrace.h&amp;gt;&lt;/span&gt;

&lt;span class=&quot;cp&quot;&gt;    #if defined(__x86__)&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;    #define ORIG_ACCUM    (4 * ORIG_EAX)&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;    #elif defined(__x86_64__)&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;    #define ORIG_ACCUM    (8 * ORIG_RAX)&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;    #else&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;    #error unsupported architecture&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;    #endif&lt;/span&gt;

    &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;status&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;pid_t&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pid&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;fork&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;())&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;perror&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;fork&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;abort&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pid&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;ptrace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PTRACE_TRACEME&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;NULL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;NULL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;kill&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;getpid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(),&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;SIGSTOP&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;open&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;foo.bar&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;O_WRONLY&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;O_CREAT&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;_exit&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;waitpid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;status&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;perror&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;waitpid&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;abort&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

            &lt;span class=&quot;n&quot;&gt;assert&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;WIFSTOPPED&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;status&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;assert&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;WSTOPSIG&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;status&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;SIGSTOP&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ptrace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PTRACE_SYSCALL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;NULL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;NULL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;perror&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;ptrace(PTRACE_SYSCALL, ...)&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;ptrace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PTRACE_KILL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;NULL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;NULL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;abort&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;waitpid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;status&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;perror&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;waitpid&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;ptrace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PTRACE_KILL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;NULL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;NULL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;abort&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

            &lt;span class=&quot;n&quot;&gt;assert&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;WIFSTOPPED&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;status&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;assert&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;WSTOPSIG&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;status&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;SIGTRAP&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

            &lt;span class=&quot;cm&quot;&gt;/* Change the system call to something invalid, so it will be denied.&lt;/span&gt;
&lt;span class=&quot;cm&quot;&gt;             */&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ptrace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PTRACE_POKEUSER&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ORIG_ACCUM&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mh&quot;&gt;0xbadca11&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;perror&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;ptrace(PTRACE_POKEUSER, ...)&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;ptrace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PTRACE_KILL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;NULL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;NULL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;abort&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

            &lt;span class=&quot;cm&quot;&gt;/* Let the process continue */&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;ptrace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PTRACE_CONT&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;NULL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;NULL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

            &lt;span class=&quot;n&quot;&gt;waitpid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;status&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;assert&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;WIFEXITED&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;status&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;exit&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;WEXITSTATUS&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;status&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;!-- _ --&gt;
&lt;p&gt;Now although the traced process calls &lt;code&gt;open(&quot;foo.bar&quot;, O_WRONLY | O_CREAT)&lt;/code&gt; the file &lt;code&gt;foo.bar&lt;/code&gt; won&amp;#8217;t be created because the tracer process denies the system call.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://feeds.feedburner.com/code/ptrace-freebsd-deny.c&quot;&gt;Here&lt;/a&gt; is the same example for &lt;a href=&quot;http://www.freebsd.org/&quot;&gt;FreeBSD&lt;/a&gt;:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;c&quot;&gt;    &lt;span class=&quot;cm&quot;&gt;/* denying system calls using ptrace on FreeBSD&lt;/span&gt;
&lt;span class=&quot;cm&quot;&gt;     */&lt;/span&gt;

&lt;span class=&quot;cp&quot;&gt;    #include &amp;lt;assert.h&amp;gt;&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;    #include &amp;lt;fcntl.h&amp;gt;&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;    #include &amp;lt;signal.h&amp;gt;&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;    #include &amp;lt;stdio.h&amp;gt;&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;    #include &amp;lt;stdlib.h&amp;gt;&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;    #include &amp;lt;unistd.h&amp;gt;&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;    #include &amp;lt;sys/types.h&amp;gt;&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;    #include &amp;lt;sys/wait.h&amp;gt;&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;    #include &amp;lt;sys/ptrace.h&amp;gt;&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;    #include &amp;lt;machine/reg.h&amp;gt;&lt;/span&gt;

    &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;status&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;pid_t&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;struct&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;reg&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pid&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;fork&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;())&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;perror&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;fork&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;abort&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pid&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;ptrace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PT_TRACE_ME&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;NULL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;kill&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;getpid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(),&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;SIGSTOP&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;open&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;foo.bar&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;O_WRONLY&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;O_CREAT&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;_exit&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;waitpid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;status&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;perror&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;waitpid&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;abort&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

            &lt;span class=&quot;n&quot;&gt;assert&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;WIFSTOPPED&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;status&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;assert&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;WSTOPSIG&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;status&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;SIGSTOP&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ptrace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PT_SYSCALL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;caddr_t&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;perror&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;ptrace(PT_SYSCALL, ...)&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;ptrace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PT_KILL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;caddr_t&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;abort&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;waitpid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;status&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;perror&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;waitpid&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;ptrace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PT_KILL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;caddr_t&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;abort&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

            &lt;span class=&quot;n&quot;&gt;assert&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;WIFSTOPPED&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;status&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;assert&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;WSTOPSIG&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;status&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;SIGTRAP&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

            &lt;span class=&quot;cm&quot;&gt;/* Change the system call to something invalid, so it will be denied.&lt;/span&gt;
&lt;span class=&quot;cm&quot;&gt;             */&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ptrace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PT_GETREGS&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;caddr_t&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;perror&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;ptrace(PT_GETREGS, ...)&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;ptrace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PT_KILL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;caddr_t&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;abort&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

            &lt;span class=&quot;n&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;r_eax&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mh&quot;&gt;0xbadca11&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ptrace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PT_SETREGS&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;caddr_t&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;perror&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;ptrace(PT_SETREGS, ...)&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;ptrace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PT_KILL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;caddr_t&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;abort&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

            &lt;span class=&quot;cm&quot;&gt;/* Let the process continue */&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;ptrace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;PT_CONTINUE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;caddr_t&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

            &lt;span class=&quot;n&quot;&gt;exit&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;!-- _ --&gt;
&lt;p&gt;We expect the same to happen here, the file &lt;code&gt;foo.bar&lt;/code&gt; shouldn&amp;#8217;t be created. But it&amp;#8217;s created. Replace the &lt;code&gt;PT_GETREGS&lt;/code&gt; and &lt;code&gt;PT_SETREGS&lt;/code&gt; calls with a &lt;code&gt;PT_KILL&lt;/code&gt; to terminate process with signal &lt;code&gt;SIGKILL&lt;/code&gt;. The file will still be created! So there&amp;#8217;s no way to deny a system call using &lt;code&gt;ptrace&lt;/code&gt; which makes it impossible to port &lt;a href=&quot;http://projects.0x90.dk/projects/show/sydbox&quot;&gt;sydbox&lt;/a&gt; to &lt;a href=&quot;http://www.freebsd.org/&quot;&gt;FreeBSD&lt;/a&gt; without patching the kernel.&lt;/p&gt;

&lt;p&gt;None of the other BSD&amp;#8217;s, neither &lt;a href=&quot;http://netbsd.gw.com/cgi-bin/man-cgi?ptrace++NetBSD-current&quot;&gt;NetBSD&lt;/a&gt; nor &lt;a href=&quot;http://leaf.dragonflybsd.org/cgi/web-man?command=ptrace&amp;section=2&quot;&gt;DragonFlyBSD&lt;/a&gt; nor &lt;a href=&quot;http://www.openbsd.org/cgi-bin/man.cgi?query=ptrace&amp;sektion=2&amp;format=html&quot;&gt;OpenBSD&lt;/a&gt;, has the ptrace request &lt;code&gt;PT_SYSCALL&lt;/code&gt; so I haven&amp;#8217;t checked if the behaviour is the same on these systems.&lt;/p&gt;
&lt;!-- vim: set tw=80 ft=mkd spell spelllang=en sw=4 sts=4 et : --&gt;</description>
	<pubDate>Sat, 16 Jan 2010 08:00:00 +0000</pubDate>
</item>
<item>
	<title>Wulf C. Krueger: Recognition</title>
	<guid>http://www.mailstation.de/wordpress/?p=5</guid>
	<link>http://www.mailstation.de/wordpress/?p=5</link>
	<description>&lt;p&gt;What keeps me doing things in my life are primarily  two factors: Money and recognition. Not necessarily in that order.&lt;/p&gt;
&lt;p&gt;In my job, I&amp;#8217;m being paid to do what I do but I couldn&amp;#8217;t ever be satisfied with just that. What &lt;strong&gt;really&lt;/strong&gt; thrills me is being recognised for the professional I am. Receiving an email from a customer that simply said &amp;#8220;Thank you. You&amp;#8217;re one of the few persons I can always rely on.&amp;#8221; made my day. I don&amp;#8217;t get that from receiving my pay-cheque.&lt;/p&gt;
&lt;p&gt;In my private life, I&amp;#8217;m mostly a father, a husband and, last but not least, a guy who loves to work on Linux. A machine that just works is a boring machine. Thus, I really love working on &lt;a title=&quot;Opens external link in new window&quot; href=&quot;http://www.exherbo.org/&quot; target=&quot;_blank&quot;&gt;Exherbo&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Working on Exherbo allows me to do and try everything, make things work &lt;strong&gt;exactly&lt;/strong&gt; the way I want them to, give back to the &lt;a title=&quot;Opens external link in new window&quot; href=&quot;http://en.wikipedia.org/wiki/Free_and_open_source_software&quot; target=&quot;_blank&quot;&gt;FOSS&lt;/a&gt; community &amp;#8211; and being recognised for the professional I am. :-)&lt;/p&gt;
&lt;p&gt;Recognition, thus, is very important for me. Now, Bryan &amp;#8220;kloeri&amp;#8221; Østergaard, has decided to remove Exherbo&amp;#8217;s &amp;#8220;Developers&amp;#8221; page which lists all the core developers in favour of a simple list of all contributors ever.&lt;/p&gt;
&lt;p&gt;This in itself is fine with me. What I really don&amp;#8217;t like about it is the fact, that those of us who do most of the work on Exherbo will be buried somewhere in that rather huge list (after all, Exherbo currently has about 95 contributors).&lt;/p&gt;
&lt;p&gt;I have Exherbo in my CV as well but am I supposed to send recruiters to a list of everyone and their dog and find me in there with no indication of my level of involvement?&lt;/p&gt;
&lt;p&gt;As much of a trifle this may look, it annoys me and so I&amp;#8217;m now using &lt;a title=&quot;Opens external link in new window&quot; href=&quot;http://gitstats.sourceforge.net/&quot; target=&quot;_blank&quot;&gt;gitstats&lt;/a&gt; to create &lt;a title=&quot;Opens external link in new window&quot; href=&quot;http://www.mailstation.de/../egitstats/activity.html&quot;&gt;statistics&lt;/a&gt; and a list of &lt;a title=&quot;Opens external link in new window&quot; href=&quot;http://www.mailstation.de/../egitstats/authors.html&quot; target=&quot;_blank&quot;&gt;authors&lt;/a&gt; myself. It&amp;#8217;s not hosted on exherbo.org (linked from our &lt;a title=&quot;Opens external link in new window&quot; href=&quot;http://www.exherbo.org/resources.html&quot; target=&quot;_blank&quot;&gt;&amp;#8220;Resources&amp;#8221; page&lt;/a&gt;, though) but on my own server:&lt;/p&gt;
&lt;p&gt;&lt;a title=&quot;Opens external link in new window&quot; href=&quot;http://www.mailstation.de/../egitstats/&quot; target=&quot;_blank&quot;&gt;http://www.mailstation.de/egitstats/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m going to add a few more graphs and stuff over time (like changes per package directory, category, etc.).&lt;/p&gt;
&lt;p&gt;If you have any suggestions (preferredly upstream-able ones), please let me know.&lt;/p&gt;</description>
	<pubDate>Sun, 10 Jan 2010 17:19:49 +0000</pubDate>
</item>
<item>
	<title>Ciaran McCreesh: Paludis 0.44.0 Released</title>
	<guid>http://ciaranm.wordpress.com/?p=745</guid>
	<link>http://ciaranm.wordpress.com/2010/01/09/paludis-0-44-0-released/</link>
	<description>&lt;p&gt;&lt;a href=&quot;http://paludis.pioto.org/&quot;&gt;Paludis&lt;/a&gt; 0.44.0 has been released:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &amp;#8216;everything&amp;#8217; set is now called &amp;#8216;installed-packages&amp;#8217;. A new set named &amp;#8216;installed-slots&amp;#8217; has been added, which is similar but includes slot restrictions matching installed slots.&lt;/li&gt;
&lt;li&gt;kdebuild-1 support has been removed, following the Gentoo Council&amp;#8217;s decision to remove all mention of it from the Package Manager Specification. Users with installed kdebuild-1 packages must remove them before upgrading.&lt;/li&gt;
&lt;li&gt;Support for EAPI 4 (formerly known as EAPI 3) is present but not installed, since the specification has yet to be approved.&lt;/li&gt;
&lt;li&gt;Support for the new EAPI 3 is present but not installed, since the specification has yet to be approved.&lt;/li&gt;
&lt;li&gt;The [.key=value] syntax for user dep specs now works with sets, sequences and spec trees. If &amp;lt; is used instead of =, a less than comparison is used for numeric values, and for compound values, a match succeeds if any item of the key is equal to the specified pattern.&lt;/li&gt;
&lt;li&gt; build_options: preserve_work can be used to avoid removing temporary working directories, and to force a non-destructive merge.&lt;/li&gt;
&lt;li&gt;Profile updates (package and slot moves) are now enabled by default.&lt;/li&gt;
&lt;li&gt;Workarounds for various interactivity abuses carried out by certain ebuilds have been added.&lt;/li&gt;
&lt;li&gt;Various large code cleanups and build system cleanups.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;Posted in paludis releases Tagged: paludis &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gocomments/ciaranm.wordpress.com/745/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/comments/ciaranm.wordpress.com/745/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godelicious/ciaranm.wordpress.com/745/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/delicious/ciaranm.wordpress.com/745/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gostumble/ciaranm.wordpress.com/745/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/stumble/ciaranm.wordpress.com/745/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godigg/ciaranm.wordpress.com/745/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/digg/ciaranm.wordpress.com/745/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/goreddit/ciaranm.wordpress.com/745/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/reddit/ciaranm.wordpress.com/745/&quot; /&gt;&lt;/a&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://stats.wordpress.com/b.gif?host=ciaranm.wordpress.com&amp;blog=3715284&amp;post=745&amp;subd=ciaranm&amp;ref=&amp;feed=1&quot; /&gt;</description>
	<pubDate>Sat, 09 Jan 2010 15:53:14 +0000</pubDate>
</item>
<item>
	<title>Bryan Østergaard: Half the solution..</title>
	<guid>http://kloeri.livejournal.com/12522.html</guid>
	<link>http://kloeri.livejournal.com/12522.html</link>
	<description>For a long time I've wanted to replace the Developers listing on Exherbos website with a list generated from git log showing all the authors.&lt;br /&gt;&lt;br /&gt;A while ago this got much easier as Ingmar Vanhassel and others added .mailcap files to our repositories. This means that some of my commits that I've accidentally made as kloeri@localhost can be grouped with kloeri@exherbo.org commits.&lt;br /&gt;&lt;br /&gt;The actual page generation is still missing however so I'm looking for a volunteer that want to tackle this task.&lt;br /&gt;&lt;br /&gt;Steps involved should be something like:&lt;br /&gt;1. Clone &lt;a href=&quot;git://git.exherbo.org/www.git&quot;&gt;git://git.exherbo.org/www.git&lt;/a&gt;&lt;br /&gt;2. Read the Makefile to get an idea how our website is maintained. Reading my &lt;a href=&quot;http://kloeri.livejournal.com/9083.html&quot;&gt;old blog post on our website setup&lt;/a&gt; is also useful&lt;br /&gt;3. Figure out how to get a list of authors from git log. I just want a plain list containing the real names of all the contributors but without email addresses, commit count or other stats like that&lt;br /&gt;4. Sort the list so it's easier to read&lt;br /&gt;5. Make sure your list can be parsed by Maruku (a Markdown processor) and make sure it's processed along all the static .mkd files&lt;br /&gt;&lt;br /&gt;Limiting the author list to just cover the arbor repository is fine for now.&lt;br /&gt;&lt;br /&gt;Finally, give me a git format-patch of your changes so I can push it and we can all enjoy the improved website. Of course, you're more than welcome to ask me for help as needed.</description>
	<pubDate>Thu, 07 Jan 2010 15:38:26 +0000</pubDate>
</item>
<item>
	<title>Ali Polatel: sydbox-0.4</title>
	<guid>http://alip.github.com//2010/01/07/sydbox-0.4</guid>
	<link>http://alip.github.com//2010/01/07/sydbox-0.4</link>
	<description>&lt;p&gt;sydbox-0.4 is released.&lt;/p&gt;

&lt;h4 id=&quot;whats_new&quot;&gt;What&amp;#8217;s new?&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Make network sandboxing on by default.&lt;/li&gt;

&lt;li&gt;When bind&amp;#8217;s port argument is zero, look up the actual port from /proc/net/tcp{,6} after the subsequent listen call for network_restrict_connect.&lt;/li&gt;

&lt;li&gt;GObject isn&amp;#8217;t a dependency anymore.&lt;/li&gt;

&lt;li&gt;Try hard to restore errno after ptrace errors.&lt;/li&gt;

&lt;li&gt;Moved all check based unit tests to gtest. dev-libs/check isn&amp;#8217;t a dependency anymore.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;download&quot;&gt;Download&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;tarball: &lt;a href=&quot;http://dev.exherbo.org/~alip/sydbox/sydbox-0.4.tar.bz2&quot;&gt;sydbox-0.4.tar.bz2&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;sign: &lt;a href=&quot;http://dev.exherbo.org/~alip/sydbox/sydbox-0.4.tar.bz2.asc&quot;&gt;sydbox-0.4.tar.bz2.asc&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;sha1sum: 67ef223d21571d42a4df122206ce22c9221b142e&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- vim: set tw=80 ft=mkd spell spelllang=en sw=4 sts=4 et : --&gt;</description>
	<pubDate>Thu, 07 Jan 2010 08:00:00 +0000</pubDate>
</item>
<item>
	<title>Ali Polatel: Network sandboxing and /proc</title>
	<guid>http://alip.github.com//2010/01/06/network-sandboxing-and-proc</guid>
	<link>http://alip.github.com//2010/01/06/network-sandboxing-and-proc</link>
	<description>&lt;p&gt;As many of you know &lt;a href=&quot;http://projects.0x90.dk/projects/show/sydbox&quot;&gt;sydbox&lt;/a&gt; can do &lt;a href=&quot;http://feeds.feedburner.com/2009/08/27/proper-network-sandboxing&quot;&gt;network sandboxing&lt;/a&gt; but for some reasons we didn&amp;#8217;t have it on by default on &lt;a href=&quot;http://www.exherbo.org&quot;&gt;Exherbo&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For those who don&amp;#8217;t know much about &lt;a href=&quot;http://projects.0x90.dk/projects/show/sydbox&quot;&gt;sydbox&lt;/a&gt; and network sandboxing let me explain it briefly. Network sandboxing has three modes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;allow&lt;/strong&gt;: All network connections are allowed.&lt;/li&gt;

&lt;li&gt;&lt;strong&gt;local&lt;/strong&gt;: Only local network connections are allowed.&lt;/li&gt;

&lt;li&gt;&lt;strong&gt;deny&lt;/strong&gt;: No network connections are allowed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In addition to that there&amp;#8217;s a &lt;strong&gt;restrict_connect&lt;/strong&gt; option which disallows connects to all addresses except addresses that one of the parents has &lt;a href=&quot;http://linux.die.net/man/2/bind&quot;&gt;bind()&lt;/a&gt;&amp;#8216;ed to.&lt;/p&gt;

&lt;p&gt;There&amp;#8217;s also a network white list which specifies the additional network addresses that are allowed in &lt;strong&gt;local&lt;/strong&gt; and &lt;strong&gt;deny&lt;/strong&gt; modes.&lt;/p&gt;

&lt;p&gt;On &lt;a href=&quot;http://www.exherbo.org&quot;&gt;Exherbo&lt;/a&gt; we use the mode &lt;strong&gt;local&lt;/strong&gt; with &lt;strong&gt;restrict_connect&lt;/strong&gt; option enabled.&lt;/p&gt;

&lt;p&gt;One limitation of sydbox was it couldn&amp;#8217;t white list &lt;a href=&quot;http://linux.die.net/man/2/bind&quot;&gt;bind()&lt;/a&gt; addresses whose port were zero. The reason is obvious. The only place we can look up the actual port is &lt;tt&gt;/proc/net/tcp&lt;/tt&gt;, or &lt;tt&gt;/proc/net/tcp6&lt;/tt&gt; for &lt;a href=&quot;http://en.wikipedia.org/wiki/Ipv6&quot;&gt;ipv6&lt;/a&gt;, and we need to do this before the &lt;a href=&quot;http://linux.die.net/man/2/bind&quot;&gt;bind()&lt;/a&gt; call has completed. The problem arises here. The &lt;tt&gt;/proc/net/tcp&lt;/tt&gt; entry is only created after the &lt;a href=&quot;http://linux.die.net/man/2/bind&quot;&gt;bind()&lt;/a&gt; call has succeeded.&lt;/p&gt;

&lt;p&gt;The solution isn&amp;#8217;t entirely trivial. We have to note the file descriptor argument of &lt;a href=&quot;http://linux.die.net/man/2/bind&quot;&gt;bind()&lt;/a&gt; along with the socket family and socket address and intercept the subsequent &lt;a href=&quot;http://linux.die.net/man/2/listen&quot;&gt;listen()&lt;/a&gt; call. Only then we can look up the port argument from &lt;tt&gt;/proc/net/tcp&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;a href=&quot;http://projects.0x90.dk/projects/show/sydbox&quot;&gt;sydbox&lt;/a&gt; &lt;a href=&quot;http://projects.0x90.dk/repositories/show/sydbox&quot;&gt;master&lt;/a&gt; has a simple implementation to solve this problem. If the port argument of a &lt;a href=&quot;http://linux.die.net/man/2/bind&quot;&gt;bind()&lt;/a&gt; call is zero, we save the file descriptor and the corresponding socket family and address to a &lt;a href=&quot;http://library.gnome.org/devel/glib/stable/glib-Hash-Tables.html&quot;&gt;GHashTable&lt;/a&gt;. After that the subsequent &lt;a href=&quot;http://linux.die.net/man/2/listen&quot;&gt;listen()&lt;/a&gt; call is intercepted and if the file descriptor of the &lt;a href=&quot;http://linux.die.net/man/2/listen&quot;&gt;listen()&lt;/a&gt; call matches a file descriptor in the hash table, &lt;a href=&quot;http://projects.0x90.dk/projects/show/sydbox&quot;&gt;sydbox&lt;/a&gt; looks up the port from &lt;tt&gt;/proc/net/tcp&lt;/tt&gt;, fills it in and white lists the address.&lt;/p&gt;

&lt;p&gt;With sydbox-0.4, which I&amp;#8217;ll release after some testing, network sandboxing will be on by default again for the &lt;a href=&quot;http://paludis.pioto.org&quot;&gt;Paludis&lt;/a&gt; profile.&lt;/p&gt;

&lt;p&gt;Just to be on the secure side ;)&lt;/p&gt;
&lt;!-- vim: set tw=80 ft=mkd spell spelllang=en sw=4 sts=4 et : --&gt;</description>
	<pubDate>Wed, 06 Jan 2010 08:00:00 +0000</pubDate>
</item>
<item>
	<title>Ali Polatel: mpdcron-0.3</title>
	<guid>http://alip.github.com//2010/01/04/mpdcron-0.3</guid>
	<link>http://alip.github.com//2010/01/04/mpdcron-0.3</link>
	<description>&lt;p&gt;&lt;a href=&quot;http://feeds.feedburner.com/mpdcron&quot;&gt;mpdcron&lt;/a&gt;-0.3 is released:&lt;/p&gt;

&lt;h4 id=&quot;whats_new&quot;&gt;What&amp;#8217;s new?&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Added stats module to keep statistics of played songs in a sqlite database&lt;/li&gt;

&lt;li&gt;Added notification module to send notifications via notify-send&lt;/li&gt;

&lt;li&gt;Added scrobbler module to submit songs to &lt;a href=&quot;http://last.fm&quot;&gt;Last.fm&lt;/a&gt; or &lt;a href=&quot;http://libre.fm&quot;&gt;Libre.fm&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;Added module support through &lt;a href=&quot;http://library.gnome.org/devel/glib/unstable/glib-Dynamic-Loading-of-Modules.html&quot;&gt;GModule&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;Added initial &lt;a href=&quot;http://github.com/alip/mpdcron/blob/master/data/mpdcron.1.pdc&quot;&gt;manpage&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;Changed name to &lt;tt&gt;mpdcron&lt;/tt&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;download&quot;&gt;Download&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Tarball: &lt;a href=&quot;http://dev.exherbo.org/~alip/mpdcron/mpdcron-0.3.tar.bz2&quot;&gt;mpdcron-0.3.tar.bz2&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;SHA1sum: &lt;a href=&quot;http://dev.exherbo.org/~alip/mpdcron/mpdcron-0.3.tar.bz2.sha1sum&quot;&gt;mpdcron-0.3.tar.bz2.sha1sum&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;Sign: &lt;a href=&quot;http://dev.exherbo.org/~alip/mpdcron/mpdcron-0.3.tar.bz2.asc&quot;&gt;mpdcron-0.3.tar.bz2.asc&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- vim: set tw=80 ft=mkd spell spelllang=en sw=4 sts=4 et : --&gt;</description>
	<pubDate>Mon, 04 Jan 2010 08:00:00 +0000</pubDate>
</item>
<item>
	<title>Ali Polatel: Bringing Last.fm home with mpdcron (part 3)</title>
	<guid>http://alip.github.com//2010/01/04/bring-lastfm-home-3</guid>
	<link>http://alip.github.com//2010/01/04/bring-lastfm-home-3</link>
	<description>&lt;p&gt;I wrote a script to import &lt;a href=&quot;http://last.fm&quot;&gt;Last.fm&lt;/a&gt; data to &lt;a href=&quot;http://feeds.feedburner.com/mpdcron&quot;&gt;mpdcron&lt;/a&gt;&amp;#8217;s statistics database with the name &lt;tt&gt;homescrape&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;It&amp;#8217;s written in &lt;a href=&quot;http://www.ruby-lang.org/&quot;&gt;ruby&lt;/a&gt; and requires &lt;a href=&quot;http://nokogiri.org/&quot;&gt;nokogiri&lt;/a&gt; to parse HTML. Currently it can import play count and loved songs. By default it will import all your &lt;a href=&quot;http://last.fm&quot;&gt;Last.fm&lt;/a&gt; tracks and if you don&amp;#8217;t want that you can pass a date using the &lt;strong&gt;&amp;#8211;since&lt;/strong&gt; option. Optionally &lt;tt&gt;homescrape&lt;/tt&gt; can make use of &lt;a href=&quot;http://chronic.rubyforge.org/&quot;&gt;chronic&lt;/a&gt; to parse dates in a huge variety of date and time formats.&lt;/p&gt;

&lt;p&gt;With this, the statistics module is complete feature-wise and I&amp;#8217;ll release &lt;tt&gt;mpdcron&lt;/tt&gt;-0.3 after some testing.&lt;/p&gt;
&lt;!-- vim: set tw=80 ft=mkd spell spelllang=en sw=4 sts=4 et : --&gt;</description>
	<pubDate>Mon, 04 Jan 2010 08:00:00 +0000</pubDate>
</item>

</channel>
</rss>
