<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/"><id>tag:blogger.com,1999:blog-12497972</id><updated>2008-06-25T00:53:21.202+01:00</updated><title type="text">Terry Burton's Blog</title><link rel="alternate" type="text/html" href="http://www.terryburton.co.uk/blog/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default?start-index=26&amp;max-results=25" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://www.terryburton.co.uk/blog/atom.xml" /><author><name>Terry Burton</name><uri>http://www.blogger.com/profile/03699617656518666561</uri><email>noreply@blogger.com</email></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>53</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-12497972.post-8511674608551101949</id><published>2008-06-25T00:12:00.002+01:00</published><updated>2008-06-25T00:53:21.233+01:00</updated><title type="text">Upgrading from PostgreSQL 7.4 to 8.1 in Debian Etch</title><content type="html">Debian allows both versions 7.4 and 8.1 of PostgreSQL to coexist on the same system which somewhat simplifies the upgrade procedure.&lt;br /&gt;&lt;br /&gt;Assuming that the PostgreSQL 7.4 packages are currently installed with a fairly standard configuration, we start by installing PostgresSQL 8.1.&lt;br /&gt;&lt;br /&gt;apt-get install postgresql-8.1 postgresql-client-8.1&lt;br /&gt;&lt;br /&gt;The newly installed system will be started on a port 5433 whilst the old system continues to run on standard port 5432. For the time being it is best to leave both instances running on these ports which will allow you to migrate the data via a simple pipe.&lt;br /&gt;&lt;br /&gt;Amend the configuration files for the new instance by hand, based on the existing configuration and restart the instance.&lt;br /&gt;&lt;br /&gt;/etc/init.d/postgresql-8.1 restart&lt;br /&gt;&lt;br /&gt;Populate the new instance with the existing databases:&lt;br /&gt;&lt;br /&gt;sudo su - postgres&lt;br /&gt;/usr/lib/postgresql/7.4/bin/pg_dumpall -p 5432 | /usr/lib/postgresql/8.1/bin/psql -p 5433&lt;br /&gt;&lt;br /&gt;Stop the old database instance and use the new client. &lt;br /&gt;&lt;br /&gt;/etc/init.d/postgresql-7.4 stop&lt;br /&gt;&lt;br /&gt;Switch the new instance to using standard port 5432. &lt;br /&gt;&lt;br /&gt;vi /etc/postgresql/8.1/main/postgresql.conf  [set port = 5432]&lt;br /&gt;/etc/init.d/postgresql-8.1 restart&lt;br /&gt;&lt;br /&gt;Use the new psql client and your own applications to ensure that the new installation is operating correctly and that the data import was successful.&lt;br /&gt;&lt;br /&gt;sudo -u postgres /usr/lib/postgresql/8.1/bin/psql -p 5432&lt;br /&gt;&lt;br /&gt;If all is well then remove the old package, maybe backing up the old data.&lt;br /&gt;&lt;br /&gt;tar cvzf ~/oldpgdata.tgz /var/lib/postgresql/7.4/data&lt;br /&gt;apt-get purge postgresql-7.4 postgresql-client-7.4&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=AhCvo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=AhCvo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=0QFXo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=0QFXo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=BSX8o"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=BSX8o" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=77pvO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=77pvO" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=u3QFO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=u3QFO" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.terryburton.co.uk/~r/tez/~4/319266751" height="1" width="1"/&gt;</content><link rel="alternate" type="text/html" href="http://www.terryburton.co.uk/blog/2008/06/upgrading-from-postgresql-74-to-81-in.html" title="Upgrading from PostgreSQL 7.4 to 8.1 in Debian Etch" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=12497972&amp;postID=8511674608551101949" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.terryburton.co.uk/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/8511674608551101949" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/8511674608551101949" /><author><name>Terry Burton</name><uri>http://www.blogger.com/profile/03699617656518666561</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-12497972.post-6669886320861648177</id><published>2008-04-13T01:44:00.009+01:00</published><updated>2008-04-13T22:53:40.670+01:00</updated><title type="text">Catching up with Barcode Writer in Pure PostScript</title><content type="html">It has been a while since I last wrote about &lt;a href="http://www.terryburton.co.uk/barcodewriter/"&gt;Barcode Writer in Pure PostScript&lt;/a&gt;. The project has been far from dormant in recent months so here is a chance to catch up with what's been keeping me busy in my “spare” time. (And even very busy at other times!)&lt;br /&gt;&lt;br /&gt;It's hard to recall from memory all of the improvements that have been made to the project over the last year but thankfully the &lt;a href="http://code.google.com/p/postscriptbarcode/source/list"&gt;commit logs&lt;/a&gt; do not forget! There have been &lt;a href="http://code.google.com/p/postscriptbarcode/source/detail?r=101"&gt;the&lt;/a&gt; &lt;a href="http://code.google.com/p/postscriptbarcode/source/detail?r=110"&gt;usual&lt;/a&gt; &lt;a href="http://code.google.com/p/postscriptbarcode/source/detail?r=114"&gt;bug&lt;/a&gt; &lt;a href="http://code.google.com/p/postscriptbarcode/source/detail?r=117"&gt;fixes&lt;/a&gt;, some code optimisations and new miscellaneous &lt;a href="http://code.google.com/p/postscriptbarcode/source/detail?r=47"&gt;features&lt;/a&gt;, but the main highlight has to be the inclusion of support for 2D barcodes which went in to the mix as follows:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;MaxiCode (June to July 2007)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;MaxiCode is an irregular matrix symbologies whose symbols consist of a hexagonal grid of dots around a bullseye finder pattern. The sequencing of these dot positions does not follow any regular pattern and so unfortunately the mapping matrix must be hard-coded into the software. MaxiCode also has various different "modes" of operation, some of which impose a strict format on the initial part of the data which makes the input encoding quite complicated.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;PDF417 (Boxing Day to New Year's Day)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Technically speaking, you might refer to PDF417 as a "stacked-linear" symbology, however BWIPP renders it using a grid of tall, rectangular cells. The worst thing about this symbology is that it requires a set of lookup tables that contain the "cluster sets" - three groups of 930 numbers used to convert from codewords to bar/space widths. The sequencing of the numbers within these sets appears to be quite random (if you know otherwise then please let me know) and so they must be hard-coded into the software which leads to a lot of uninteresting code – ouch!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Data Matrix (early- to mid-January)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The is a matrix symbology that can be rendered using a grid of squares through which the data zig-zags in eight-module, L-shaped clusters. Whilst the ordering of the modules within the grid is reasonably complicated, it can nevertheless be determined algorithmically for only a small amount of computational cost and requires only some minor tweaking to fix up the corner cases for matrices that do not contain some multiple of eight modules. So overall this symbology can be coded very nicely. We can generate both the standard square symbols types as well as the optional rectangular symbols.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Aztec Code (early- to mid-February)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is a matrix symbology that can be rendered using a grid of squares with the data wrapping clockwise in two-module wide layers around a square finder pattern in the centre of the symbol. Whilst there are a few different types of symbols it is possible to fold the implementation for each of these into a single relatively sophisticated but direct algorithm that does containing excessive branching. So again, this symbology can be coded quite cleanly.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;QR Code (February to late-March)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is a matrix symbology that can be rendered using a grid of squares with the data vertically meandering in two-modules columns from right to left. With respect to implementation this symbology is quite hideous with its one saving grace being that is does not require the inclusion of hard-coded lookup tables for module placement. Firstly, in certain symbols the final data codeword is defined to be four bits wide rather than the usual eight which results in an awkward bit shift having to be applied to the trailing codewords in order to avoid propagating the exceptional processing required for these specials cases throughout the remainder of symbol generation process. Secondly, the "drunken walk" algorithm for placing the modules within the symbol (whilst avoiding the pre-defined static feature placeholders) has an unexplained inconsistency in the way that you perform the hop over the vertical timing pattern. Thirdly, the format and version information functions are unnecessarily complicated, however since their domain is very small it is possible to use a small set of pre-calculated lookup tables for these in order to avoiding using a significant amount of complex code. But finally, the worst aspect of this symbology is the optional, but recommended, process of apply eight distinct mask patterns to the candidate symbol in turn and then to evaluate these in order to select the one that would produce an output symbol with the fewest undesirable properties. To perform the evaluation algorithm as given by the specification turns out to be significantly more operationally expensive that the entire remainder of the symbol generation process! So for the time being we always select one particular mask.&lt;br /&gt;&lt;br /&gt;So, we presently support all major 2D barcode formats, but with one major caveat - the user (or application developer) that is working with BWIPP has to do some preparative work to process the barcode data into the particular intermediate format required by each encoder for which they require the corresponding specification. This is a small task compared to the sometimes sophisticated numeric manipulation involved in the remainder of the symbol generation process.  However it does involve extensive string manipulation which is a task for which PostScript is definitely not well suited whilst purpose-built application development languages (such as Perl and C++) have much better support for this task either natively or through libraries.&lt;br /&gt;&lt;br /&gt;So the next major set of challenges on the BWIPP roadmap is to integrate the high-level encoding routine for each 2D symbology that convert from a user-supplied ASCII string to the intermediate format that is required by the encoders at present. The result will be that the novice user can simply enter the data that they require to place into a barcode, with only the minimal restrictions as necessarily imposed by each symbology, and our code will create the most optimal encoding that produces the best symbol for the given data, thereby making the system much easier to use for the uninitiated user.&lt;br /&gt;&lt;br /&gt;Lastly, but by no means least, an extremely useful component in the implementation of support for 2D barcode generation has been the extensive testing performed by Jean-François Barbeau. He has helped detect and fix a number of bugs, some &lt;a href="http://groups.google.com/group/postscriptbarcode/msg/3b49cd55eb9edb91"&gt;obvious&lt;/a&gt;, and some &lt;a href="http://groups.google.com/group/postscriptbarcode/msg/0e936bb8466b1d95"&gt;much more subtle&lt;/a&gt; so that we can place much greater confidence in the correctness of the output – so a big thank you on behalf of the PostScript barcoding community!&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=VuHFo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=VuHFo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=Oiv4o"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=Oiv4o" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=kbmxo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=kbmxo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=HVMOO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=HVMOO" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=lflnO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=lflnO" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.terryburton.co.uk/~r/tez/~4/269196990" height="1" width="1"/&gt;</content><link rel="alternate" type="text/html" href="http://www.terryburton.co.uk/blog/2008/04/catching-up-with-barcode-writer-in-pure.html" title="Catching up with Barcode Writer in Pure PostScript" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=12497972&amp;postID=6669886320861648177" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.terryburton.co.uk/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/6669886320861648177" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/6669886320861648177" /><author><name>Terry Burton</name><uri>http://www.blogger.com/profile/03699617656518666561</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-12497972.post-5151728429017691802</id><published>2008-01-12T00:02:00.000Z</published><updated>2008-01-12T00:39:09.752Z</updated><title type="text">Toying with Barcodes - a talk from 24C3</title><content type="html">Interesting and entertaining talk by FX of Phenoelit from &lt;a href="http://events.ccc.de/congress/2007/"&gt;24C3&lt;/a&gt; about hacking real-world systems that (mis)use barcodes. Doesn't mention &lt;a href="http://www.terryburton.co.uk/barcodewriter"&gt;BWIPP&lt;/a&gt; though :-P&lt;br /&gt;&lt;br /&gt;&lt;embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=-5716320056489246991&amp;hl=en" flashvars=""&gt; &lt;/embed&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=Bsz0o"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=Bsz0o" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=xf7fo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=xf7fo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=TUxio"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=TUxio" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=6ltuO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=6ltuO" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=s8SpO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=s8SpO" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.terryburton.co.uk/~r/tez/~4/215287808" height="1" width="1"/&gt;</content><link rel="alternate" type="text/html" href="http://www.terryburton.co.uk/blog/2008/01/toying-with-barcodes-talk-from-24c3.html" title="Toying with Barcodes - a talk from 24C3" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=12497972&amp;postID=5151728429017691802" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.terryburton.co.uk/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/5151728429017691802" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/5151728429017691802" /><author><name>Terry Burton</name><uri>http://www.blogger.com/profile/03699617656518666561</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-12497972.post-2297165382434955789</id><published>2007-11-30T12:08:00.000Z</published><updated>2007-12-02T23:45:40.627Z</updated><title type="text">Taming p0f by chunk processing STDIN</title><content type="html">&lt;a href="http://lcamtuf.coredump.cx/p0f.shtml"&gt;P0f&lt;/a&gt; is a useful, but slightly outdated, tool for passive operating system fingerprinting. Unfortunately it generates fingerprint information for every identified packet matching the &lt;a href="http://www.tcpdump.org/papers/bpf-usenix93.pdf"&gt;BPF filter&lt;/a&gt; provided by the user. There is no built in option to aggregate the data so that it is framed per host within a given time interval or set of contiguous records. This means that when p0f is attached to the SPAN port or tap of a high volume pipe the log files that it generates grow very quickly as they are full of repeated information.&lt;br /&gt;&lt;br /&gt;The following little script wraps the p0f process and removes the redundant information from each 1000 record chunk of output:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;#! /bin/sh&lt;br /&gt;&lt;br /&gt;exec 3&gt;&amp;-&lt;br /&gt;exec 2&gt;&amp;-&lt;br /&gt;exec 1&gt;&amp;-&lt;br /&gt;cd /&lt;br /&gt;&lt;br /&gt;nohup p0f -i eth2 -u p0f -N -U -q -p -t -l 'src net 143.210.0.0/16' | \&lt;br /&gt;sed -n -e 's/^&lt;\([A-Za-z0-9: ]*\)&gt; \([0-9.]\{7,15\}\):[0-9]\{1,5\} - \&lt;br /&gt;\(.*\)/\2 \3/p' | gawk 'ORS=NR%1000?"\n":"\000"' | xargs -0 -i bash -c \&lt;br /&gt;'date +"*** %c ***"; echo "$0" | sort | uniq' {} &gt;&gt; /srv/p0f/os.log &amp;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;p0f aside, the interesting part boils down to this useful Unix shell programming paradigm:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;$INPUT_CMD | gawk "ORS=NR%$BLOCK_LINES?'\n':'\000'" | xargs -0 -i $PROCESS_CMD {}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;It splits the streamed output of $INPUT_CMD down into chunks of $BLOCK_LINES lines which are immediately independently processed by $PROCESS_CMD. It chunks the data by replacing the ordinary line separator on every $BLOCK_LINES line into an ASCII 0 character which xargs -0 uses as the argument separator.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=mAtxo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=mAtxo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=7rH4o"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=7rH4o" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=ERUxo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=ERUxo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=1nupO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=1nupO" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=D8N8O"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=D8N8O" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.terryburton.co.uk/~r/tez/~4/192990218" height="1" width="1"/&gt;</content><link rel="alternate" type="text/html" href="http://www.terryburton.co.uk/blog/2007/11/taming-p0f-by-chunk-processing-from.html" title="Taming p0f by chunk processing STDIN" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=12497972&amp;postID=2297165382434955789" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.terryburton.co.uk/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/2297165382434955789" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/2297165382434955789" /><author><name>Terry Burton</name><uri>http://www.blogger.com/profile/03699617656518666561</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-12497972.post-8426034578053807669</id><published>2007-11-09T00:48:00.000Z</published><updated>2007-11-28T23:45:05.353Z</updated><title type="text">Apache accesslog to syslog</title><content type="html">Apache allows its error logs to be written to the local syslog, however it does not natively support the directing of access logs to the syslog. How frustrating!&lt;br /&gt;&lt;br /&gt;It does however allow access logs to be &lt;a href="http://httpd.apache.org/docs/2.2/logs.html#piped"&gt;written to a pipe&lt;/a&gt; and I have seen a number of &lt;a href="http://www.oreilly.com/pub/a/sysadmin/2006/10/12/httpd-syslog.html"&gt;home-brew scripts&lt;/a&gt; that essentially redirect the Apache access log data from STDIN to syslog.&lt;br /&gt;&lt;br /&gt;I've yet to see anything quite as simple as the following directive that I cooked up today:&lt;br /&gt;&lt;br /&gt;CustomLog "|/usr/bin/logger -t apache -i -p local6.notice" combined&lt;br /&gt;&lt;br /&gt;It pipes the access log data to the BSD logger(1) utility that is installed by default &lt;a href="http://www.freebsd.org/cgi/man.cgi?query=logger&amp;sektion=1"&gt;on&lt;/a&gt; &lt;a href="http://linux.die.net/man/1/logger"&gt;almost&lt;/a&gt; &lt;a href="http://uw713doc.sco.com/en/man/html.1bsd/logger.1bsd.html"&gt;any&lt;/a&gt; &lt;a href="http://docs.sun.com/app/docs/doc/816-5165/6mbb0m9jt?a=view"&gt;Unix&lt;/a&gt; &lt;a href="http://www.devworld.apple.com/documentation/Darwin/Reference/ManPages/man1/logger.1.html"&gt;system&lt;/a&gt;. No need for any more of those STDIN wrapper scripts!&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=huyVo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=huyVo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=gPmSo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=gPmSo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=HKUJo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=HKUJo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=ewCJO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=ewCJO" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=I5AzO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=I5AzO" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.terryburton.co.uk/~r/tez/~4/181946147" height="1" width="1"/&gt;</content><link rel="alternate" type="text/html" href="http://www.terryburton.co.uk/blog/2007/11/apache-accesslog-to-syslog.html" title="Apache accesslog to syslog" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=12497972&amp;postID=8426034578053807669" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.terryburton.co.uk/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/8426034578053807669" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/8426034578053807669" /><author><name>Terry Burton</name><uri>http://www.blogger.com/profile/03699617656518666561</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-12497972.post-4457556908890182955</id><published>2007-10-31T12:20:00.000Z</published><updated>2007-11-09T01:26:45.632Z</updated><title type="text">Saving the planet...</title><content type="html">Photo captioned &lt;a href="http://www2.le.ac.uk/ebulletin/news/press-releases/2000-2009/2007/10/nparticle.2007-10-17.9553057384"&gt;"Racing at Big Green Week"&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Lessons learned: Space hoppers are slower than bikes, especially uphill.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=4xsxo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=4xsxo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=mYVOo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=mYVOo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=DxUmo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=DxUmo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=IAqfO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=IAqfO" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=wkr5O"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=wkr5O" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.terryburton.co.uk/~r/tez/~4/177678495" height="1" width="1"/&gt;</content><link rel="alternate" type="text/html" href="http://www.terryburton.co.uk/blog/2007/10/saving-planet.html" title="Saving the planet..." /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=12497972&amp;postID=4457556908890182955" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.terryburton.co.uk/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/4457556908890182955" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/4457556908890182955" /><author><name>Terry Burton</name><uri>http://www.blogger.com/profile/03699617656518666561</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-12497972.post-9154435269585262226</id><published>2007-09-11T17:43:00.000+01:00</published><updated>2007-09-16T22:07:48.995+01:00</updated><title type="text">Deleting old Snort and BASE event data from MySQL</title><content type="html">The following SQL that I recently cooked up thoroughly clears out the data from events that are more than 28 days old, then reoptimises the tables. It takes some time to complete so it is probably best scheduled as a regular night time cron job.&lt;br /&gt;&lt;br /&gt;The DELETE FROM ... USING syntax is quite appealing and powerful...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;DELETE FROM event WHERE timestamp &amp;lt; DATE_SUB(NOW(),INTERVAL 28 DAY);&lt;br /&gt;&lt;br /&gt;DELETE FROM data    USING data    LEFT OUTER JOIN event USING (sid,cid) WHERE event.sid IS NULL;&lt;br /&gt;DELETE FROM iphdr   USING iphdr   LEFT OUTER JOIN event USING (sid,cid) WHERE event.sid IS NULL;&lt;br /&gt;DELETE FROM icmphdr USING icmphdr LEFT OUTER JOIN event USING (sid,cid) WHERE event.sid IS NULL;&lt;br /&gt;DELETE FROM tcphdr  USING tcphdr  LEFT OUTER JOIN event USING (sid,cid) WHERE event.sid IS NULL;&lt;br /&gt;DELETE FROM udphdr  USING udphdr  LEFT OUTER JOIN event USING (sid,cid) WHERE event.sid IS NULL;&lt;br /&gt;DELETE FROM opt     USING opt     LEFT OUTER JOIN event USING (sid,cid) WHERE event.sid IS NULL;&lt;br /&gt;&lt;br /&gt;DELETE FROM acid_event USING acid_event LEFT OUTER JOIN event USING (sid,cid) WHERE event.sid IS NULL;&lt;br /&gt;DELETE FROM ag USING acid_ag_alert AS ag LEFT OUTER JOIN event AS e ON ag.ag_sid=e.sid AND ag.ag_cid=e.cid WHERE e.sid IS NULL;&lt;br /&gt;&lt;br /&gt;OPTIMIZE TABLE event, data, iphdr, icmphdr, tcphdr, udphdr, opt, acid_event, acid_ag_alert;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=twk5o"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=twk5o" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=TLOYo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=TLOYo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=nfAUo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=nfAUo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=pDZTO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=pDZTO" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=1n83O"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=1n83O" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.terryburton.co.uk/~r/tez/~4/155104574" height="1" width="1"/&gt;</content><link rel="alternate" type="text/html" href="http://www.terryburton.co.uk/blog/2007/09/deleting-old-snort-and-base-event-data.html" title="Deleting old Snort and BASE event data from MySQL" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=12497972&amp;postID=9154435269585262226" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.terryburton.co.uk/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/9154435269585262226" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/9154435269585262226" /><author><name>Terry Burton</name><uri>http://www.blogger.com/profile/03699617656518666561</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-12497972.post-5201267859610603940</id><published>2007-08-29T23:27:00.000+01:00</published><updated>2007-08-29T23:31:29.444+01:00</updated><title type="text">Note to self...</title><content type="html">When replacing LILO with GRUB on a Debian host, remember to run update-grub after running grub-install and before rebooting. GRUB works better when there is a menu.lst file - doh!&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=XDcno"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=XDcno" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=jbfdo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=jbfdo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=qrzjo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=qrzjo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=0AhcO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=0AhcO" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=yYUdO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=yYUdO" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.terryburton.co.uk/~r/tez/~4/149835645" height="1" width="1"/&gt;</content><link rel="alternate" type="text/html" href="http://www.terryburton.co.uk/blog/2007/08/note-to-self.html" title="Note to self..." /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=12497972&amp;postID=5201267859610603940" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.terryburton.co.uk/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/5201267859610603940" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/5201267859610603940" /><author><name>Terry Burton</name><uri>http://www.blogger.com/profile/03699617656518666561</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-12497972.post-7700283612974350463</id><published>2007-08-25T01:23:00.000+01:00</published><updated>2007-08-27T15:29:55.260+01:00</updated><title type="text">HTML Renderer in Pure PostScript cited in a security research paper</title><content type="html">Just noticed a passing reference to my &lt;a href="http://www.terryburton.co.uk/htmlrenderer/"&gt;HTML Renderer in Pure PostScript&lt;/a&gt; project in the extended abstract of an interesting &lt;a href="http://dx.doi.org/10.1109/SP.2007.24"&gt;scientific paper&lt;/a&gt;[1] that focuses on how weaknesses in the PostScript interpreter security model can result in information leakage, compromising the anonymity of document reviewers.&lt;br /&gt;&lt;br /&gt;The attack vector follows the notion that the same PostScript document can be rendered differently depending upon information that can be obtained from the interpreter's context; environment variables and contents of the filesystem. Amongst other exploits this raises the possibility of creating a contract that changes after having been electronically signed.&lt;br /&gt;&lt;br /&gt;[1] Michael Backes, Markus Durmuth, Dominique Unruh. Information Flow in the Peer-Reviewing Process. In proceedings of IEEE Symposium on Security and Privacy 2007.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=Q7Iyo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=Q7Iyo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=fUqbo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=fUqbo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=VkY1o"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=VkY1o" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=KtMRO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=KtMRO" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=QsVhO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=QsVhO" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.terryburton.co.uk/~r/tez/~4/147918080" height="1" width="1"/&gt;</content><link rel="alternate" type="text/html" href="http://www.terryburton.co.uk/blog/2007/08/html-renderer-in-pure-postscript-cited.html" title="HTML Renderer in Pure PostScript cited in a security research paper" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=12497972&amp;postID=7700283612974350463" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.terryburton.co.uk/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/7700283612974350463" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/7700283612974350463" /><author><name>Terry Burton</name><uri>http://www.blogger.com/profile/03699617656518666561</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-12497972.post-9093826987743605033</id><published>2007-08-22T19:53:00.000+01:00</published><updated>2007-11-09T10:30:39.874Z</updated><title type="text">Fully Automatic Installation of Debian Etch with Root on LVM using FAI</title><content type="html">At work we have been making extensive use of &lt;a href="http://www.informatik.uni-koeln.de/fai/"&gt;FAI&lt;/a&gt; to rapidly deploy Debian hosts. It allows us to take a virgin server and network install a fully functioning Debian system in under four minutes (less than three minutes if you discount the time our hosts spend performing their BIOS tests). It also provides a extensively customisable disaster recovery system into which you can netboot any problematic hosts to investigate and repair them. I thoroughly recommend it to anyone that manages more than a few Debian hosts and that is willing to spend the couple of days or so that it takes to configure and explore all of the options.&lt;br /&gt;&lt;br /&gt;Unfortunately for me the current version does not natively support the Linux Logical Volume Management. There are at least two community contributed helper scripts that provide this functionality by means of well-placed hooks provided by FAI, but neither of these have support for root on LVM; in fact one actively discourages it by displaying a warning! Anyhow, placing the root filesystem on LVM is enormously beneficial since amongst other things it allows you to make a consistent point-in-time snapshot of the entire filesystem with no disruption to running services.&lt;br /&gt;&lt;br /&gt;In the past, placing root on LVM has indeed been problematic adding extra complexity to the boot process. It requires the bootloader to pass an initial ramdisk to the kernel which contains the necessary modules, libraries, binaries and scripts to discover and enable the Logical Volume that contains the root filesystem, without which the system of no use at all. It must deal with the activation of inactive volumes and handle special volumes such as those under snapshot, mirroring, or even cryptographically secured.&lt;br /&gt;&lt;br /&gt;Historically, support for this has been poor due to the old-style initial ramdisks built by Debian Sarge and prior being incapable of dealing with a variety of abnormal conditions, causing the startup scripts within the ramdisk to quietly and uninterruptedly hang with no simple means by which to inspect the state of the locked up system to determine the cause of failure. This periodically rendered unbootable hosts that were not cleanly shut down thus requiring the aid of a live CD distro or netboot disaster recovery image in order to fix the problems. (Usually it would be that the snapshots had failed having ran out of room, requiring that they be first removed in order for the live volume to be made accessible.)&lt;br /&gt;&lt;br /&gt;Thankfully this has now all changed because of a vast improvement called initramfs - the new system for creating initial ramdisks in Etch. initramfs has bundled the BusyBox Bash shell clone which is launched if there is any problem in mounting the root filesystem thereby allowing you to repair it without the need for an external recovery system. Together with the big improvements that have made the startup scripts much more robust, this now mostly solves any problems with putting root on LVM. Accordingly, you can take reassurance from the fact that the new Debian Installer provides root on LVM functionality as an installation option for any new Debian system, making it no longer an exceptional setup but a well-trodden path.&lt;br /&gt;&lt;br /&gt;Despite not supporting LVM, the FAI system can be easily modified by writing custom hook scripts that are run at designated points during the host installation process. Peter Gervai has created a script to provide support for &lt;a href="http://faiwiki.informatik.uni-koeln.de/index.php/User:Gervai/Raid_and_LVM_hook"&gt;software RAID and LVM&lt;/a&gt; by extending a previous script by Michal Svamberg that provides support for &lt;a href="http://faiwiki.informatik.uni-koeln.de/index.php/User:Svamberg/Software_RAID"&gt;software RAID&lt;/a&gt;. The RAID and LVM hook enables the FAI installer to create the necessary LVM entities according to user provided configuration files and it is well documented in on its wiki page. &lt;br /&gt;&lt;br /&gt;However there are some steps that must be taken in addition to the setup instructions documented in the wiki in order to successfully FAI build LVM-enabled hosts.&lt;br /&gt;&lt;br /&gt;Firstly, ensure that the netboot installer itself is LVM capable by loading device-mapper kernel module before the partitioning task starts: &lt;br /&gt;&lt;br /&gt;Simply append dm_mod to the kernelmodules variable in the config file class/20-hwdetect.source in the NFS-exported configuration directory.&lt;br /&gt;&lt;br /&gt;Secondly, ensure that the fully installed target system is independantly bootable by recreating the initial ramdisk to have LVM capability and by fixing an erroneous line that finds its way into /etc/fstab due to a minor bug in the FAI partitioning scripts. &lt;br /&gt;&lt;br /&gt;Create a new config file called package_config/SW_RAID in the NFS-exported config directory:&lt;br /&gt;&lt;br /&gt;lvm-common&lt;br /&gt;lvm2&lt;br /&gt;mdadm&lt;br /&gt;&lt;br /&gt;Also create a new config file called scripts/SW_RAID/10-misc:&lt;br /&gt;&lt;br /&gt;#! /bin/bash&lt;br /&gt;error=0 ; trap "error=$((error|1))" ERR&lt;br /&gt;cat &amp;lt;&amp;lt;EOF &amp;gt;&amp;gt; $target/etc/initramfs-tools/modules&lt;br /&gt;dm_mod&lt;br /&gt;dm_mirror&lt;br /&gt;dm_snapshot&lt;br /&gt;EOF&lt;br /&gt;$ROOTCMD update-initramfs -u&lt;br /&gt;# Fix the incorrect /dev/ entry that SW_RAID helper makes in fstab&lt;br /&gt;sed -ie '/^\/dev\/ /d' /tmp/target/etc/fstab&lt;br /&gt;exit $error&lt;br /&gt;&lt;br /&gt;Those basic changes should be all that is necessary to get any host that is part of the SW_RAID class to FAI install as a root on LVM system. Hopefully we can expect FAI to natively support LVM sometime soon, which will make the process even more painless!&lt;br /&gt;&lt;br /&gt;Finally, here are some sample disk configuration files to give you some idea of how easy it should be to maintain.&lt;br /&gt;&lt;br /&gt;Sample disk_config/FAIBASE file:&lt;br /&gt;&lt;br /&gt;disk_config disk1&lt;br /&gt;primary  /boot         200         rw                   ; ext2 boot&lt;br /&gt;primary  swap          2000        rw&lt;br /&gt;logical  -             1024-&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Sample class/SW_RAID.var file:&lt;br /&gt;&lt;br /&gt;SW_RAID_CONFIG="&lt;br /&gt;"&lt;br /&gt;&lt;br /&gt;LVM_VG_CONFIG="&lt;br /&gt;vg00[]=/dev/cciss/c0d0p5&lt;br /&gt;"&lt;br /&gt;&lt;br /&gt;LVM_LV_CONFIG="&lt;br /&gt;vg00/root[-n root    ]=2G:/:ext3:&lt;br /&gt;vg00/home[-n home    ]=5G:/home:ext3:&lt;br /&gt;vg00/srv[-n srv      ]=10G:/srv:ext3:&lt;br /&gt;vg00/var[-n var      ]=5G:/var:ext3:&lt;br /&gt;vg00/varlog[-n varlog]=5G:/var/log:ext3:&lt;br /&gt;"&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=a7OAo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=a7OAo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=aZeco"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=aZeco" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=52kzo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=52kzo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=AXRlO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=AXRlO" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=uxKwO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=uxKwO" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.terryburton.co.uk/~r/tez/~4/147062204" height="1" width="1"/&gt;</content><link rel="alternate" type="text/html" href="http://www.terryburton.co.uk/blog/2007/08/fully-automatic-installation-of-debian.html" title="Fully Automatic Installation of Debian Etch with Root on LVM using FAI" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=12497972&amp;postID=9093826987743605033" title="3 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.terryburton.co.uk/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/9093826987743605033" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/9093826987743605033" /><author><name>Terry Burton</name><uri>http://www.blogger.com/profile/03699617656518666561</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-12497972.post-5594999371444162709</id><published>2007-08-19T22:57:00.000+01:00</published><updated>2007-08-20T00:55:57.314+01:00</updated><title type="text">PXE boot FreeDOS with MEMDISK to flash a GIGABYTE BIOS</title><content type="html">Having recently sorting through some of the junk that I have been accumulating over the past several years, I decided that I would reincarnate a three-years dormant 1GHz AMD Athlon, which has been almost stripped bare for parts, into a silent running MythTV frontend. After loading the board with a whole 256Mb of RAM, replacing the graphics card with an old NVIDIA GeForce2 MX400, replacing the existing network card with a PXE-capable 3COM 905C Fast EtherLink XL PCI NIC, and salvaging a 40Gb Seagate ST340823A HDD, I was ready to begin.&lt;br /&gt;&lt;br /&gt;The task: Install Ubuntu using the Netboot installation image via PXE boot; a process that is usually straightforward and is adequately described in several guides such as this, http://wiki.koeln.ccc.de/index.php/Ubuntu_PXE_Install&lt;br /&gt;&lt;br /&gt;The problem: The installer was hanging when attempting to read the partitions on the ST340823A HDD, with the IDE bus being repeatedly reset until it finally gave up. This was no surprise as the CMOS setup utility was freezing whenever I performed an IDE Auto Configuration from within BIOS configuration system, however if it was set to auto detect the drive on boot then things would proceed normally. Hence I assumed (correctly, as it happens) that my current GA-5AA F3 BIOS was restricted to a ~30GB IDE HDD size limit.&lt;br /&gt;&lt;br /&gt;New task: Flash a legacy GIGABYTE BIOS on a machine with no external drives and with no MS-DOS boot disks or images to hand; a process that is less simple and not well documented.&lt;br /&gt;&lt;br /&gt;GIGABYTE supply an updated BIOS version F7b(Beta) for the board. This comes in the form of a self-extracting executable that can be downloaded from http://www.giga-byte.co.uk/Support/Motherboard/BIOS_Model.aspx?ProductID=1439&lt;br /&gt;&lt;br /&gt;The Linux file utility identifies this as an "MS-DOS executable PE for MS Windows (GUI) Intel 80386 32-bit, UPX compressed, RAR self-extracting archive" from which I figured that I could extract the contents using the rar:&lt;br /&gt;&lt;br /&gt;$ rar x motherboard_bios_ga-5aa_f7b\(beta\).exe &lt;br /&gt;&lt;...snip...&gt;&lt;br /&gt;Extracting  autoexec.bat                                              OK &lt;br /&gt;Extracting  flash830.exe                                              OK &lt;br /&gt;Extracting  GA-5AA.F7b                                                OK &lt;br /&gt;All OK&lt;br /&gt;&lt;br /&gt;The autoexec.bat indicates that you can flash your BIOS from MS-DOS as simply as A:\FLASH830 GA-5AA.F7b&lt;br /&gt;&lt;br /&gt;So how do you boot into MS-DOS in order to do this? Cheat! Enter FreeDOS - an open source MS-DOS compatible operating system, which is claimed as being what most motherboard manufacturers now use in the development of their BIOSes. The project provides a raw image of a minimal boot floppy that is available from the file archive at http://www.freedos.org/freedos/files/ called fdboot.img. This needs to be amended to include the flash830.exe and GA-5AA.F7b files which can be done easily from within Linux.&lt;br /&gt;&lt;br /&gt;mount -t vfat -o loop fdboot.img /mnt/floppy&lt;br /&gt;cp flash830.exe GA-5AA.F7b /mnt/floppy&lt;br /&gt;umount /mnt/floppy&lt;br /&gt;&lt;br /&gt;Now all that is required is to boot this image and run the flash commands. MEMDISK, part of the SYSLINUX suite, provides support for booting legacy operating systems and this will work over PXELINUX, http://syslinux.zytor.com&lt;br /&gt;&lt;br /&gt;Instructions for configuring PXELINUX are available in several places, but in summary the process involves configuring a DHCP server, configuring a TFTP server, and then copying the necessary boot images and creating the configuration files in the TFTP root.&lt;br /&gt;&lt;br /&gt;The required pxelinux.cfg pragma for booting a FreeDOS boot disk image is as follows:&lt;br /&gt;&lt;br /&gt;label dos&lt;br /&gt;    kernel memdisk&lt;br /&gt;    append initrd=fdboot.img&lt;br /&gt;&lt;br /&gt;With all of this configured the PC netbooted into FreeDOS from where the flash utility was invoked as A:\FLASH830 GA-5AA.F7b. After reporting success I rebooted the PC and reassuringly the BIOS screen reported the BIOS version as being GA-5AA F7b. And most importantly, the IDE Auto Configuration feature now detected the drive correctly, without freezing!&lt;br /&gt;&lt;br /&gt;So I had another go at installing Ubuntu using the Netboot installer... and unfortunately it hung in exactly the same place! Whilst the BIOS update had certainly resolved a particular size limit issue, it had unfortunately not solved the issue with this hard disk. &lt;br /&gt;&lt;br /&gt;A bit of Googling revealed that the failure is due to a firmware bug in the Seagate ST340823A model that incorrectly reports the total number of addressable sectors rather than the last addressable sector (zero-based) when queried with the "stroke" feature enabled, http://bugzilla.kernel.org/show_bug.cgi?id=8816 &lt;br /&gt;&lt;br /&gt;When the Ubuntu partitioner examines the drive it attempts to read the final sector, as reported by the hard disk, which is non-existent and so causes the kernel to throw a fit, repeatedly retrying the read between forced IDE bus resets, until the channel gives up completely.&lt;br /&gt;&lt;br /&gt;Unfortunately Seagate do not appear to have released an updated firmware for this drive so it looks like I will miss another opportunity to put FreeDOS to good use ;-)&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=6lPvo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=6lPvo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=w27Ho"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=w27Ho" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=rmRko"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=rmRko" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=IhgJO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=IhgJO" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=pbJKO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=pbJKO" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.terryburton.co.uk/~r/tez/~4/145930076" height="1" width="1"/&gt;</content><link rel="alternate" type="text/html" href="http://www.terryburton.co.uk/blog/2007/08/pxe-boot-freedos-with-memdisk-to-flash.html" title="PXE boot FreeDOS with MEMDISK to flash a GIGABYTE BIOS" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=12497972&amp;postID=5594999371444162709" title="1 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.terryburton.co.uk/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/5594999371444162709" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/5594999371444162709" /><author><name>Terry Burton</name><uri>http://www.blogger.com/profile/03699617656518666561</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-12497972.post-6992612277062205172</id><published>2007-08-02T18:19:00.000+01:00</published><updated>2007-08-02T18:22:31.194+01:00</updated><title type="text">Micro$oft's improved password policy</title><content type="html">I'm glad to see that Micro$oft are at last taking security seriously...&lt;br /&gt;&lt;br /&gt;"Error Message: Your Password Must Be at Least 18770 Characters and Cannot Repeat Any of Your Previous 30689 Passwords"&lt;br /&gt;&lt;br /&gt;&lt;a href="http://support.microsoft.com/kb/276304"&gt;http://support.microsoft.com/kb/276304&lt;/a&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=SCsJo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=SCsJo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=oLlxo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=oLlxo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=7H96o"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=7H96o" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=Y8NnO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=Y8NnO" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=0oArO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=0oArO" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.terryburton.co.uk/~r/tez/~4/140022163" height="1" width="1"/&gt;</content><link rel="alternate" type="text/html" href="http://www.terryburton.co.uk/blog/2007/08/microofts-improved-password-policy.html" title="Micro$oft's improved password policy" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=12497972&amp;postID=6992612277062205172" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.terryburton.co.uk/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/6992612277062205172" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/6992612277062205172" /><author><name>Terry Burton</name><uri>http://www.blogger.com/profile/03699617656518666561</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-12497972.post-1476041839975305301</id><published>2007-07-18T01:15:00.000+01:00</published><updated>2007-07-18T01:24:53.505+01:00</updated><title type="text">Barcode Writer in Pure PostScript is evil, says Google</title><content type="html">"Results 1 - 10 of about 666..."&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.terryburton.co.uk/blog/uploaded_images/evilbarcodes-799760.png"&gt;&lt;img style="margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="http://www.terryburton.co.uk/blog/uploaded_images/evilbarcodes-799752.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And I thought it was just a myth.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=XLipo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=XLipo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=GGjro"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=GGjro" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=FwO5o"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=FwO5o" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=C0SZO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=C0SZO" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=9aDEO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=9aDEO" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.terryburton.co.uk/~r/tez/~4/134745222" height="1" width="1"/&gt;</content><link rel="alternate" type="text/html" href="http://www.terryburton.co.uk/blog/2007/07/barcode-writer-in-pure-postscript-is.html" title="Barcode Writer in Pure PostScript is evil, says Google" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=12497972&amp;postID=1476041839975305301" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.terryburton.co.uk/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/1476041839975305301" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/1476041839975305301" /><author><name>Terry Burton</name><uri>http://www.blogger.com/profile/03699617656518666561</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-12497972.post-1066201290576994723</id><published>2007-06-29T10:18:00.000+01:00</published><updated>2007-06-29T10:22:15.546+01:00</updated><title type="text">Rapid context switching on our User Mode Linux host</title><content type="html">Now with hundreds of thousands of context switches per second I'm surprised that the box has any time to do any work in userland!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----&lt;br /&gt;r  b   swpd   free   buff  cache   si   so    bi    bo   in    cs us sy id wa&lt;br /&gt;13  0   2760  17060  15596 3767972    0    0    76   224  354 146832 30 70  0  0&lt;br /&gt;10  0   2760  16944  15596 3768020    0    0    48     0  355 135414 45 55  0  0&lt;br /&gt;10  0   2760  16556  15596 3768532    0    0    28     0  349 143074 37 63  0  0&lt;br /&gt;9  0   2760  17380  15596 3767776    0    0    80     0  330 141158 41 59  0  0&lt;br /&gt;9  1   2760  17140  15596 3767852    0    0    20     0  356 144483 39 61  0  0&lt;br /&gt;9  0   2760  17152  15596 3767888    0    0    36   160  322 145730 37 63  0  0&lt;br /&gt;9  0   2760  17000  15596 3768020    0    0   108     0  354 139198 38 62  0  0&lt;br /&gt;6  1   2760  17660  15596 3767264    0    0    72     0  285 129292 48 52  0  0&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=LJiUo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=LJiUo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=WgT7o"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=WgT7o" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=aWzMo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=aWzMo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=10uVO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=10uVO" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=mxa8O"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=mxa8O" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.terryburton.co.uk/~r/tez/~4/130908878" height="1" width="1"/&gt;</content><link rel="alternate" type="text/html" href="http://www.terryburton.co.uk/blog/2007/06/rapid-context-switching-on-our-user.html" title="Rapid context switching on our User Mode Linux host" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=12497972&amp;postID=1066201290576994723" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.terryburton.co.uk/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/1066201290576994723" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/1066201290576994723" /><author><name>Terry Burton</name><uri>http://www.blogger.com/profile/03699617656518666561</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-12497972.post-5318494489025147263</id><published>2007-06-27T23:04:00.000+01:00</published><updated>2007-06-28T21:10:20.230+01:00</updated><title type="text">Using BASE Alert Groups to deploy countermeasures to Snort alerts</title><content type="html">For those who are familiar with the snort + BASE NIDS system...&lt;br /&gt;&lt;br /&gt;I've cooked up a simple script that gives easily parsable output of the result of a simple SQL query that inspects already BASE Alert Groups to find the remote or local IP address, Alert Group name, number of alerts and last alert time for all hosts that have generated more that a given threshold of alerts within a given timeframe.&lt;br /&gt;&lt;br /&gt;use strict;&lt;br /&gt;use DBI;&lt;br /&gt;&lt;br /&gt;my $time_period=24; # hours&lt;br /&gt;my $event_threshold=0;&lt;br /&gt;my $is_local='NOT'; # blank for local, 'NOT' for remote&lt;br /&gt;&lt;br /&gt;my $sql=&amp;lt;&amp;lt;END;&lt;br /&gt;&lt;br /&gt;SELECT \@A:=IF(iph.ip_src $is_local BETWEEN INET_ATON('192.168.1.0') AND INET_ATON('192.168.1.255'),iph.ip_src,iph.ip_dst) AS ip,&lt;br /&gt;  INET_NTOA(\@A) AS ip_f,&lt;br /&gt;  ag.ag_name,&lt;br /&gt;  MAX(e.timestamp) AS last_event,&lt;br /&gt;  COUNT(ag.ag_name) AS num_events&lt;br /&gt;FROM acid_ag AS ag&lt;br /&gt;  JOIN acid_ag_alert AS aga USING (ag_id)&lt;br /&gt;  JOIN event AS e ON aga.ag_sid=e.sid AND aga.ag_cid=e.cid&lt;br /&gt;  JOIN iphdr AS iph USING (sid,cid)&lt;br /&gt;WHERE e.timestamp&gt;DATE_SUB(now(),INTERVAL ? HOUR)&lt;br /&gt;GROUP BY ip, ag.ag_name&lt;br /&gt;HAVING num_events&gt;?&lt;br /&gt;ORDER BY \@A&lt;br /&gt;&lt;br /&gt;END&lt;br /&gt;&lt;br /&gt;my $dbh=DBI-&gt;connect('DBI:mysql:snort','root');&lt;br /&gt;my $sth=$dbh-&gt;prepare($sql);&lt;br /&gt;$sth-&gt;execute($time_period,$event_threshold);&lt;br /&gt;&lt;br /&gt;print "$_-&gt;{ag_name}\t$_-&gt;{ip_f}\t$_-&gt;{num_events}\t$_-&gt;{last_event}\n" while ($_=$sth-&gt;fetchrow_hashref);&lt;br /&gt;&lt;br /&gt;$sth-&gt;finish;&lt;br /&gt;$dbh-&gt;disconnect;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The output will look something like this:&lt;br /&gt;&lt;br /&gt;banned     43.280.25.17   6       2007-06-27 16:07:27&lt;br /&gt;banned     43.280.25.210  6       2007-06-27 05:46:20&lt;br /&gt;botnet     147.67.18.2    2       2007-06-26 11:39:20&lt;br /&gt;mailblock  147.67.18.2    1       2007-06-26 09:13:08&lt;br /&gt;mailblock  217.21.112.5   2       2007-06-27 13:41:48&lt;br /&gt;&lt;br /&gt;The remote host 147.67.18.2 has within the last 24 hours generated events that have been placed into two distinct Alert Groups: two events into "botnet" (the last event being seen 2007-06-26 11:39:20) and one event into "mailblock" at 2007-06-26 09:13:08.&lt;br /&gt;&lt;br /&gt;This output can be parsed frequently by a number of cron scripts that deploy countermeasures against these events, e.g. block the "botnet" IP addresses at the firewall, or build zone files from "mailblock" IP addresses for local DNSBLs to filter mail from such hosts, etc...&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=6bDZo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=6bDZo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=DqOco"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=DqOco" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=atExo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=atExo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=v8zfO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=v8zfO" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=Af5vO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=Af5vO" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.terryburton.co.uk/~r/tez/~4/130908879" height="1" width="1"/&gt;</content><link rel="alternate" type="text/html" href="http://www.terryburton.co.uk/blog/2007/06/using-base-alert-groups-to-deploy.html" title="Using BASE Alert Groups to deploy countermeasures to Snort alerts" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=12497972&amp;postID=5318494489025147263" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.terryburton.co.uk/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/5318494489025147263" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/5318494489025147263" /><author><name>Terry Burton</name><uri>http://www.blogger.com/profile/03699617656518666561</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-12497972.post-3060932175842861927</id><published>2007-05-07T13:46:00.000+01:00</published><updated>2007-05-07T13:55:25.204+01:00</updated><title type="text">Glad I live in a country that doesn't respect the DMCA...</title><content type="html">)(-F(-!!-)"-(D-&amp;$-E£-%B-D*-$!-%^-C%-^£-%^-**-C)&lt;br /&gt;&lt;br /&gt;The above is a representation of a work that has been protected from viewing using a trivial copy protection scheme (using my British keyboard). If you live in a jurisdiction that accepts the DMCA then you may be breaking the law to decode it!&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=qfpRo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=qfpRo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=H9tyo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=H9tyo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=EoaDo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=EoaDo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=4qT5O"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=4qT5O" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=0hYlO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=0hYlO" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.terryburton.co.uk/~r/tez/~4/130908880" height="1" width="1"/&gt;</content><link rel="alternate" type="text/html" href="http://www.terryburton.co.uk/blog/2007/05/glad-i-live-in-country-that-doesnt.html" title="Glad I live in a country that doesn't respect the DMCA..." /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=12497972&amp;postID=3060932175842861927" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.terryburton.co.uk/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/3060932175842861927" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/3060932175842861927" /><author><name>Terry Burton</name><uri>http://www.blogger.com/profile/03699617656518666561</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-12497972.post-1819431734138440669</id><published>2007-05-04T21:05:00.000+01:00</published><updated>2007-05-07T13:57:46.707+01:00</updated><title type="text">Sign my petition - "Free TV Listings"</title><content type="html">I've posted a &lt;a href="http://petitions.pm.gov.uk/Free-TV-listings/"&gt;petition&lt;/a&gt; to the UK Government's E-petitions website.&lt;br /&gt;&lt;br /&gt;Petitions with two hundred or more signatories get an official response from 10 Downing Street, so it's got be worth having a go with some of the issues that would be difficult to otherwise raise.&lt;br /&gt;&lt;br /&gt;My particular petition has so far received just over one hundred signatures and reads as follows:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;Currently anyone publishing television listings in the UK is required by law under Schedule 17 of the Broadcasting Act 1990 to pay a royalty, which BDS (Broadcasting Data Services) collects on behalf of the broadcasters.&lt;br /&gt;&lt;br /&gt;By releasing television schedule details into the public domain many web sites will be able to integrate this information into their content, creating a tighter convergence between the web and television which will benefit advertisers, broadcasters, webmasters and importantly, the consuming public.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And my motivation for creating it is explained in this extract from a mailing list post:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;There are several voluntary projects that wish to combine a database of extensive program information with an XML feed of the non-free official channel listings to create an uberfeed that can be used to schedule recordings, etc. Unfortunately they are prohibited from doing so.&lt;br /&gt;&lt;br /&gt;I'm currently working on a mini-project in Haskell that can hook into the scheduling system to instruct MythTV to record any program that it "thinks" you will like, based its on similarity to things that you have recorded in the past (same actors, genres, etc...) and on what other users with similar interests are watching (assuming that you wish to federate your viewing information with other users). It'll also routinely record first in a series and anything else that I can think may be useful.&lt;br /&gt;&lt;br /&gt;A detailed and accurate data feed is essential for this system to work well.&lt;br /&gt;&lt;/span&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=5LGYo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=5LGYo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=5Mygo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=5Mygo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=MCIVo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=MCIVo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=LC1OO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=LC1OO" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=6dGcO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=6dGcO" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.terryburton.co.uk/~r/tez/~4/130908881" height="1" width="1"/&gt;</content><link rel="alternate" type="text/html" href="http://www.terryburton.co.uk/blog/2007/05/sign-my-petition.html" title="Sign my petition - &quot;Free TV Listings&quot;" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=12497972&amp;postID=1819431734138440669" title="2 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.terryburton.co.uk/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/1819431734138440669" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/1819431734138440669" /><author><name>Terry Burton</name><uri>http://www.blogger.com/profile/03699617656518666561</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-12497972.post-2416283685480106761</id><published>2007-04-18T20:04:00.001+01:00</published><updated>2007-04-22T17:45:30.663+01:00</updated><title type="text">Ubuntu root on LVM from the standard Live CD</title><content type="html">These are the notes I made whilst installing Feisty Fawn from the standard Live CD, such that the root filesystem lands on LVM.&lt;br /&gt;&lt;br /&gt;This guide does make the assumption that you know your way around Linux and is based on a rather simplified setup (for the sake of clarity) that you will probably want to amend for your specific needs.&lt;br /&gt;&lt;br /&gt;The instructions ought to work with little or no amendment for any recent flavour of Ubuntu including Edgy Eft and Dapper Drake. If you have problems following this guide then Google is your friend!&lt;br /&gt;&lt;br /&gt;Boot from the CD into the live desktop.&lt;br /&gt;&lt;br /&gt;Configure networking so that we can use aptitude to obtain the necessary LVM packages.&lt;br /&gt;&lt;br /&gt;sudo aptitude update&lt;br /&gt;sudo aptitude install lvm2&lt;br /&gt;modprobe dm-mod&lt;br /&gt;&lt;br /&gt;cfdisk /dev/hda  # or /dev/hdb, /dev/sda, /dev/cciss/c0d0, etc., throughout...&lt;br /&gt;&lt;br /&gt;Write the partitions to disk something like the following:&lt;br /&gt;&lt;br /&gt;hda1 ; Boot ; Primary ; Linux ext2 ; 200Mb # at beginning of drive for /boot&lt;br /&gt;hda2 ; ; Primary ; Linux swap ; 2048Mb # at end of drive&lt;br /&gt;hda3 ; ; Primary ; Linux LVM ; 120000Mb # in remaining space for root LV and other LVs&lt;br /&gt;&lt;br /&gt;pvcreate /dev/hda3 # This may fail, see below for fix&lt;br /&gt;&lt;br /&gt;At the time of writing there existed a bug in the packaged version of LVM that can be fixed with: ln -s /lib/lvm-200 /lib/lvm-0&lt;br /&gt;&lt;br /&gt;vgcreate vg00 /dev/hda3&lt;br /&gt;lvcreate -n root -L 10G vg00 # If this fails make sure that you have performed modprobe dm-mod&lt;br /&gt;&lt;br /&gt;It is necessary to create filesystems on the devices in order for the ubiquity installer to correctly identify them as possible install targets.&lt;br /&gt;&lt;br /&gt;mkfs.ext2 /dev/hda1&lt;br /&gt;mkfs.ext3 /dev/mapper/vg00-root&lt;br /&gt;mkswap /dev/hda2&lt;br /&gt;&lt;br /&gt;Proceed through the installation as normal, except choose to manually prepare the disks as follows:&lt;br /&gt;&lt;br /&gt;/dev/hda1: use as: ext2 ; mount point: /boot ; format: yes&lt;br /&gt;/dev/hda2: use as: swap&lt;br /&gt;/dev/mapper/vg00-root: use as: ext3 ; mount point: / ; format: yes&lt;br /&gt;&lt;br /&gt;Allow the install to complete and click "Continue using the live CD".&lt;br /&gt;&lt;br /&gt;mount /dev/mapper/vg00-root /target&lt;br /&gt;mount /dev/hda1 /target/boot&lt;br /&gt;mount -t proc proc /target/proc&lt;br /&gt;mount -t sysfs sysfs /target/sys&lt;br /&gt;chroot /target&lt;br /&gt;&lt;br /&gt;aptitude update&lt;br /&gt;aptitude install lvm2&lt;br /&gt;ln -s /lib/lvm-200 /lib/lvm-0&lt;br /&gt;&lt;br /&gt;vgchange -ay # Tests that LVM works from within the target system&lt;br /&gt;&lt;br /&gt;Add the following modules to both /etc/modules and /etc/initramfs-tools/modules: &lt;br /&gt;dm-mod&lt;br /&gt;dm-snapshot&lt;br /&gt;dm-mirror&lt;br /&gt;&lt;br /&gt;update-initramfs -u&lt;br /&gt;&lt;br /&gt;Exit the chroot by pressing ctrl-d.&lt;br /&gt;&lt;br /&gt;umount /target/proc /target/sys /target/boot /target&lt;br /&gt;&lt;br /&gt;Reboot into your new "root on LVM" Ubuntu system.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=RqIRo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=RqIRo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=ApZho"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=ApZho" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=OpAko"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=OpAko" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=D3RRO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=D3RRO" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=mEGJO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=mEGJO" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.terryburton.co.uk/~r/tez/~4/130908882" height="1" width="1"/&gt;</content><link rel="alternate" type="text/html" href="http://www.terryburton.co.uk/blog/2007/04/ubuntu-feisty-fawn-with-root-on-lvm_18.html" title="Ubuntu root on LVM from the standard Live CD" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=12497972&amp;postID=2416283685480106761" title="2 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.terryburton.co.uk/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/2416283685480106761" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/2416283685480106761" /><author><name>Terry Burton</name><uri>http://www.blogger.com/profile/03699617656518666561</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-12497972.post-3499695385087427232</id><published>2007-04-16T23:31:00.000+01:00</published><updated>2007-04-16T23:34:01.707+01:00</updated><title type="text">Technical Poetry... and quiet good too!</title><content type="html">"Algorhyme" by Radia Perlman&lt;br /&gt;&lt;br /&gt;I think that I shall never see&lt;br /&gt;A graph more lovely than a tree.&lt;br /&gt;A tree whose crucial property&lt;br /&gt;Is loop-free connectivity.&lt;br /&gt;&lt;br /&gt;A tree which must be sure to span&lt;br /&gt;So packets can reach every LAN.&lt;br /&gt;First the Root must be selected&lt;br /&gt;By ID it is elected.&lt;br /&gt;Least cost paths from Root are traced&lt;br /&gt;In the tree these paths are placed.&lt;br /&gt;&lt;br /&gt;A mesh is made by folks like me&lt;br /&gt;Then bridges find a spanning tree.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=5413o"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=5413o" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=EhyIo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=EhyIo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=olfwo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=olfwo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=fmiTO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=fmiTO" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=FbtkO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=FbtkO" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.terryburton.co.uk/~r/tez/~4/130908883" height="1" width="1"/&gt;</content><link rel="alternate" type="text/html" href="http://www.terryburton.co.uk/blog/2007/04/technical-poetry-and-quiet-good-too.html" title="Technical Poetry... and quiet good too!" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=12497972&amp;postID=3499695385087427232" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.terryburton.co.uk/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/3499695385087427232" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/3499695385087427232" /><author><name>Terry Burton</name><uri>http://www.blogger.com/profile/03699617656518666561</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-12497972.post-3183806242197300277</id><published>2007-04-10T12:06:00.000+01:00</published><updated>2007-04-28T22:05:48.404+01:00</updated><title type="text">"Not a Great Loss"</title><content type="html">A friend told me this at the weekend...&lt;br /&gt;&lt;br /&gt;Tony B'&lt;a href="http://www.number-10.gov.uk/output/Page4.asp"&gt;liar&lt;/a&gt; was visiting a primary school class when the teacher began a discussion about the meaning of the word "tragedy".&lt;br /&gt;&lt;br /&gt;The teacher began by asking the children for an example of a tragedy.&lt;br /&gt;&lt;br /&gt;A boy spoke up saying, "If my mum and my gran were walking down the street and a car lost control and ran them over, that would be a tragedy."&lt;br /&gt;&lt;br /&gt;The teacher turned to the PM and asked, "What do you think Mr Blair?"&lt;br /&gt;&lt;br /&gt;"No," replied Mr Blair, "I would call that an Accident."&lt;br /&gt;&lt;br /&gt;A girl spoke up saying, "If a coach carrying a hundred children drove off a cliff killing everyone on board, that would be a tragedy."&lt;br /&gt;&lt;br /&gt;"No," said Mr Blair, "I would call that a Great Loss."&lt;br /&gt;&lt;br /&gt;Finally, another boy raised his hand saying, "If Air Force One, carrying Mr Blair and Mr Bush, was struck down by a missile and blown up, that would be a tragedy."&lt;br /&gt;&lt;br /&gt;"That's right!" exclaimed Mr Blair, "And why do you think that would be a tragedy?"&lt;br /&gt;&lt;br /&gt;The boy thought carefully and reasoned, "Well, it wouldn't be an Accident and it wouldn't be a Great Loss..."&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=Nfpyo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=Nfpyo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=1Oi7o"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=1Oi7o" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=cuIao"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=cuIao" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=fjHyO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=fjHyO" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=ondOO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=ondOO" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.terryburton.co.uk/~r/tez/~4/130908884" height="1" width="1"/&gt;</content><link rel="alternate" type="text/html" href="http://www.terryburton.co.uk/blog/2007/04/not-great-loss.html" title="&quot;Not a Great Loss&quot;" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=12497972&amp;postID=3183806242197300277" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.terryburton.co.uk/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/3183806242197300277" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/3183806242197300277" /><author><name>Terry Burton</name><uri>http://www.blogger.com/profile/03699617656518666561</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-12497972.post-2101616808973314947</id><published>2006-12-17T21:25:00.000Z</published><updated>2006-12-17T21:55:31.788Z</updated><title type="text">SCO vs IBM</title><content type="html">Two very educational webcasts from the Harvard Journal of Law that give enormous insight into both sides of the SCO vs IBM battle.&lt;br /&gt;&lt;br /&gt;Darl McBride, CEO and President, The SCO Group&lt;br /&gt;&lt;br /&gt;&lt;embed style="width: 400px; height: 326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=-3014784074460731768&amp;hl=en-GB" flashvars=""&gt;&lt;/embed&gt;&lt;br /&gt;&lt;br /&gt;Eben Moglen, General Counsel for the Free Software Foundation&lt;br /&gt;&lt;br /&gt;&lt;embed style="width: 400px; height: 326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=6345039926759549406&amp;amp;hl=en-GB" flashvars=""&gt;&lt;/embed&gt;&lt;br /&gt;&lt;br /&gt;Some references:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Eldred_v._Ashcroft"&gt;Eldred v. Ashcroft&lt;/a&gt;&lt;br /&gt;&lt;a href="http://moglen.law.columbia.edu/publications/maine-speech.html"&gt;Freeing the Mind&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.researchoninnovation.org/opensrc.pdf"&gt;Zero marginal cost economics of Open Source&lt;/a&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=0Iplo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=0Iplo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=OpUlo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=OpUlo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=kZTWo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=kZTWo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=KS1IO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=KS1IO" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=Ai87O"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=Ai87O" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.terryburton.co.uk/~r/tez/~4/130908885" height="1" width="1"/&gt;</content><link rel="alternate" type="text/html" href="http://www.terryburton.co.uk/blog/2006/12/sco-vs-ibm.html" title="SCO vs IBM" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=12497972&amp;postID=2101616808973314947" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.terryburton.co.uk/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/2101616808973314947" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/2101616808973314947" /><author><name>Terry Burton</name><uri>http://www.blogger.com/profile/03699617656518666561</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-12497972.post-5345437260603360489</id><published>2006-12-02T01:43:00.000Z</published><updated>2006-12-02T01:48:08.595Z</updated><title type="text" /><content type="html">I like this piece of clever code. You might too...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;float InvSqrt (float x){&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    float xhalf = 0.5f*x;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    int i = *(int*)&amp;x;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    i = 0x5f3759df - (i&gt;&gt;1);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    x = *(float*)&amp;i;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    x = x*(1.5f - xhalf*x*x);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    return x;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;}&lt;/span&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=mMSoo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=mMSoo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=zKP0o"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=zKP0o" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=46QDo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=46QDo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=SkYsO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=SkYsO" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=sGZzO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=sGZzO" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.terryburton.co.uk/~r/tez/~4/130908886" height="1" width="1"/&gt;</content><link rel="alternate" type="text/html" href="http://www.terryburton.co.uk/blog/2006/12/i-like-this-piece-of-clever-code.html" title="" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=12497972&amp;postID=5345437260603360489" title="1 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.terryburton.co.uk/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/5345437260603360489" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/5345437260603360489" /><author><name>Terry Burton</name><uri>http://www.blogger.com/profile/03699617656518666561</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-12497972.post-7407930126735101440</id><published>2006-11-15T17:44:00.000Z</published><updated>2006-11-15T22:07:42.965Z</updated><title type="text">Falling into a trap with gpg</title><content type="html">A colleague recently had quite a scare whilst using gpg to verify the signature of a file he had amended but forgot to re-sign... it verified!!!&lt;br /&gt;&lt;br /&gt;Had he found a collision case? He amended the file again and rechecked. It still verified, so not a collision case?!&lt;br /&gt;&lt;br /&gt;Was gpg broken? He moved the files to my box (running a more recent version of gpg) and rechecked. Still verified!&lt;br /&gt;&lt;br /&gt;After a little debugging all was made clear, but it revealed a frighteningly common misunderstanding of the gpg tool that is all to easy to fall into and effectively makes signature verification useless.&lt;br /&gt;&lt;br /&gt;He wanted to sign a file creating a detached signature in Armor format. The typical use case is that one can make the file (myfile) and its signature (myfile.asc) available for download, and the recipient can then use the signer's public key to verify that myfile has not been tampered with.&lt;br /&gt;&lt;br /&gt;From the gpg manpage the first options that seem to offer what we want are:&lt;br /&gt;&lt;br /&gt;-s, --sign [file]&lt;br /&gt;Make a signature. This command may be combined with --encrypt (for a signed and encrypted message), --symmetric (for a signed and symmetrically encrypted message), or --encrypt and --symmetric together (for a signed message that may be decrypted via a secret key or a passphrase).&lt;br /&gt;&lt;br /&gt;-a, --armor&lt;br /&gt;Create ASCII armored output.&lt;br /&gt;&lt;br /&gt;So we proceed to make a detached signature as follows:&lt;br /&gt;$ gpg -as myfile&lt;br /&gt;&lt;br /&gt;We can verify it with:&lt;br /&gt;$ gpg --verify myfile.asc&lt;br /&gt;gpg: Good signature from...&lt;br /&gt;&lt;br /&gt;Now we tamper with the original:&lt;br /&gt;$ echo abc &gt;&gt; myfile&lt;br /&gt;$ gpg --verify myfile.asc&lt;br /&gt;gpg: Good signature from...&lt;br /&gt;&lt;br /&gt;Oh! That shouldn't happen, and to somebody who is not familiar with the correct usage of gpg, the cause is far from obvious.&lt;br /&gt;&lt;br /&gt;The are in fact two problems with the above procedure. Firstly the correct method to create a detached Armor signature for a file is to use &lt;span style="font-family:courier new;"&gt;gpg -ab myfile&lt;/span&gt;, not &lt;span style="font-family:courier new;"&gt;gpg -as myfile&lt;/span&gt;. The latter command does not generate a "detached" signature, but rather creates a self-contained signature containing the original file contents and then writes this in Armor format into a &lt;span style="font-family:courier new;"&gt;.asc&lt;/span&gt; file, giving you a file that is proportional in size to the original file. As can be seen in the except from the manpage, this important distinction is not made clear.&lt;br /&gt;&lt;br /&gt;Secondly, the correct way to verify a detached signature is &lt;span style="font-family:courier new;"&gt;gpg --verify myfile.asc myfile&lt;/span&gt; (which always verifies the given signature against the given file), and not with &lt;span style="font-family:courier new;"&gt;gpg --verify myfile.asc&lt;/span&gt; as many sources wrongly quote. The latter command, given a detached &lt;span style="font-family:courier new;"&gt;&lt;/span&gt;signature will look for the corresponding file and validate it against the signature, however given a self-contained signed file it will validate only that file, generating output that is identical in either case, i.e. the user has no way of knowing in which of these two modes of operation the command has just run. Anybody attempting to verify a detached signature in this way is vulnerable to the following exploit: An attacker tampers with the original file and then also replaces the &lt;span style="font-family:courier new;"&gt;.asc&lt;/span&gt; with any self-contained signed file produced by the author using &lt;span style="font-family:courier new;"&gt;gpg -as&lt;/span&gt;. Since the self-contained signature has not been tampered with and will verify, the victim is falsely assured of the integrity of their file.&lt;br /&gt;&lt;br /&gt;Armed with this knowledge it should be clear now what was going wrong with the above example. gpg was correct and &lt;span style="font-family:courier new;"&gt;myfile.asc&lt;/span&gt; was indeed valid, but only valid as a self-contained signed file and not as a signature for &lt;span style="font-family:courier new;"&gt;myfile&lt;/span&gt;, however the command did not make this clear. This would be best addressed in two ways. User education, for example amending the man page description of the &lt;span style="font-family:courier new;"&gt;gpg -s&lt;/span&gt; command to clearly spell out this pitfall, and by changing the behaviour of gpg to make it clear exactly what has been verified, perhaps by displaying a warning in cases where such confusion can arise.&lt;br /&gt;&lt;br /&gt;Good security tools should make it difficult to fall into simple traps and must help to eliminate human error where at all possible. When experienced administrators are easily able to fall pray to such small oversights with such grave consequences, the tools are clearly deficient.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=L82zo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=L82zo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=8pe1o"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=8pe1o" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=WdQpo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=WdQpo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=4F6ZO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=4F6ZO" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=cLvMO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=cLvMO" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.terryburton.co.uk/~r/tez/~4/130908887" height="1" width="1"/&gt;</content><link rel="alternate" type="text/html" href="http://www.terryburton.co.uk/blog/2006/11/falling-into-trap-with-gpg.html" title="Falling into a trap with gpg" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=12497972&amp;postID=7407930126735101440" title="2 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.terryburton.co.uk/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/7407930126735101440" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/7407930126735101440" /><author><name>Terry Burton</name><uri>http://www.blogger.com/profile/03699617656518666561</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-12497972.post-5401772320513570587</id><published>2006-11-15T16:39:00.000Z</published><updated>2007-05-04T21:00:44.613+01:00</updated><title type="text">Non-interative package installation with APT</title><content type="html">One of the frequently voiced frustrations of working with Debian's APT package management tool is the difficulty of running it completely non-interactively. I've had to solve this problem recently and found none of the usual solutions to be as successful as they claim to be.&lt;br /&gt;&lt;br /&gt;Normally, even with when specifying the "noninteractive" option, the question of whether or not to replace local configuration files with the packager's configuration files will still appear and block the script. However, the following bash command will automatically select the default option for any questions that appear during installation:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;/usr/bin/yes '' | DEBIAN_FRONTEND=noninteractive \&lt;br /&gt;/usr/bin/apt-get -y install package&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I'd be interested to hear from anybody who finds a real situation that for which the above technique does not work.&lt;br /&gt;&lt;br /&gt;Note: when the empty parameter '' is passed to /usr/bin/yes it outputs a stream of carriage returns, rather than the usual stream of 'y's. This causes the default, usually safe, option to be selected as the answer to the questions that any packages may ask.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=EN5Wo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=EN5Wo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=11wYo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=11wYo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=VAmPo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=VAmPo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=XZSdO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=XZSdO" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=18BtO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=18BtO" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.terryburton.co.uk/~r/tez/~4/130908888" height="1" width="1"/&gt;</content><link rel="alternate" type="text/html" href="http://www.terryburton.co.uk/blog/2006/11/non-interative-package-installation.html" title="Non-interative package installation with APT" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=12497972&amp;postID=5401772320513570587" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.terryburton.co.uk/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/5401772320513570587" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/5401772320513570587" /><author><name>Terry Burton</name><uri>http://www.blogger.com/profile/03699617656518666561</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-12497972.post-114685907409364116</id><published>2006-05-05T20:50:00.000+01:00</published><updated>2006-11-15T16:34:02.404Z</updated><title type="text">Linux Format mentions barcodes in Scribus</title><content type="html">Nice to see that the &lt;a href="http://docs.scribus.net/devel/classBarcode.html"&gt;Barcode Maker plugin&lt;/a&gt; for &lt;a href="http://www.scribus.net"&gt;Scribus&lt;/a&gt; hasn't gone unnoticed...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;From &lt;a href="http://www.linuxformat.co.uk"&gt;Linux Format&lt;/a&gt; issue 80:&lt;br /&gt;&lt;br /&gt;Open source desktop publishing turns pro.&lt;br /&gt;&lt;br /&gt;In many ways, Scribus is the runaway success story of open source graphics. Yes, Gimp is great, Inkscape has potential - but Scribus set itself the challenge of coming from nowhere to being a solid, professional DTP solution, and by traditional standards of software development, it's done that in next to no time.&lt;br /&gt;&lt;br /&gt;In fact, the latest release of Scribus (1.3.3) offers features not available as standard in professional DTP software, such as the ability to generate barcodes completely within the software. It would be unthinkable for a commercial DTP product to come from zero lines of code to a reliable, professional tool in five years.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=MEpao"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=MEpao" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=4c9Xo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=4c9Xo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=iJUgo"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=iJUgo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=5fJfO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=5fJfO" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.terryburton.co.uk/~f/tez?a=5E4EO"&gt;&lt;img src="http://feeds.terryburton.co.uk/~f/tez?i=5E4EO" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.terryburton.co.uk/~r/tez/~4/130908889" height="1" width="1"/&gt;</content><link rel="alternate" type="text/html" href="http://www.terryburton.co.uk/blog/2006/05/linux-format-mentions-barcodes-in.html" title="Linux Format mentions barcodes in Scribus" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=12497972&amp;postID=114685907409364116" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.terryburton.co.uk/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/114685907409364116" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/12497972/posts/default/114685907409364116" /><author><name>Terry Burton</name><uri>http://www.blogger.com/profile/03699617656518666561</uri><email>noreply@blogger.com</email></author></entry></feed>
