Aards life <bwachter-alife@lart.info>
http://bwachter.lart.info
daily fooaardmail
http://bwachter.lart.info/#135
I published a stable release of <a href="http://bwachter.lart.info./projects/aardmail/">aardmail</a> some time ago. I've been using it for retrieving (pop3) and sending (smtp) all my mail for several month now. While it currently covers most of the features I need some things may need to be added. Drop me a note or (better) subscribe to the aardmail mailinglist if you have any ideas worth discussing.
<br />
<br />cram-md5. I don't like it at all, but it seems there are people out there using it. Currently you can use client certificates to authentificate to a mail relay, or password for pop3. I'd prefer having client certificates for pop3, too. My client can do it (it simply goes on with something like list after user, and the server requests a client certificate for auth) -- however, it seems that no other person ever wanted something like that, so there are currently no servers out there supporting it. I don't know if and when I'll add a pop3d to aardmail.
<br />
<br />imap. I don't use it, but many people requested it. If you really want this feature please consider donating. I'll do it someday for sure, but with low priority.
<br />
<br />sendmail. The current `sendmail' just spools mail into a users Maildir. I'd like to have a replacement for ssmtp, with a Maildir as spool. I'm still trying to figure out what's the best way to do this, but that's most likely the next part I'll change -- unless someone pays me for other features.
<br />
<br />fetchmail. I'd like to have a frontend which acts like fetchmail, and calls the different aardmail clients. Especially fetchmail daemon mode has been requested by some people.
<br />
<br />Windows users. I don't have the time to do much testing under Windows. I added Windows support to see how painful it is nowadays to support both UNIX and Windows, but can't do much more testing than doing regular builds.POSIX Threads
http://bwachter.lart.info/#134
I did some tests on POSIX threads recently. The API is simply braindead -- I have no idea how someone could ever think the way joinable threads work would be a good idea.
<br />
<br /></p><pre>pthread_create(&thread1, &thread_attr, init_thread, (void*) 1);
<br />pthread_create(&thread2, &thread_attr, init_thread, (void*) 2);
<br />
<br />pthread_join(thread1);
<br />pthread_join(thread2);</pre><p>
<br />
<br />Please note that POSIX specifies that threads get created joinable per default. However, not all implementations stick to this. Therefore it's good style to explicitely create threads joinable.
<br />
<br />The thread calling pthread_join will now block until thread1 terminates. Then block again until thread2 terminates (or go on immediately if thread2 already terminated). What happens if something went wrong in thread1, making it never terminate? Nothing. It will never go over the join. In complex applications I'd feel pretty bad using the above schematics without having a 3rd thread controlling the other 2, killing them if necessary.
<br />
<br />Wait, you can get over this with detaching the threads? Partly true. We can easily create the threads detached, or detach a thread with pthread_detach (there's no way of making a detached thread joinable again):
<br />
<br /></p><pre>pthread_attr_init(&thread_attr);
<br />pthread_attr_setdetachstate(&thread_attr, PTHREAD_CREATE_DETACHED);</pre><p>
<br />
<br />Whoops. The application exits now before our threads finished, killing all of them. Bad one. Back to the manpages -- there must be something like wait() for processes. The design of pthreads can't be that bad. Well, it seems it can.
<br />
<br />So far I did not find anything like wait(). However, with the following code you can get close to it:
<br />
<br /></p><pre>main:
<br />
<br />int num_threads;
<br />pthread_create(&thread1, &thread_attr, init_thread, (void*) 1);
<br />num_threads++;
<br />pthread_create(&thread2, &thread_attr, init_thread, (void*) 2);
<br />num_threads++;
<br />while (num_threads > 0){
<br /> pthread_mutex_lock(&condition_mutex);
<br /> pthread_cond_wait(&cond_texit, &condition_mutex);
<br /> pthread_mutex_unlock(&condition_mutex);
<br />}
<br />
<br />init_thread:
<br />
<br />pthread_mutex_lock(&condition_mutex);
<br />threads_active--;
<br />pthread_cond_signal(&cond_texit);
<br />pthread_mutex_unlock(&condition_mutex);</pre><p>
<br />
<br />Yep. You have to
<br />- keep track of how many threads you created
<br />- wait for a condition in the thread (at least you don't have to poll)
<br />- make sure a thread decreases the number of active threads before it exits and signals cond_exit
<br />just to emulate something like a wait()!
<br />
<br />You should always let the thread decrease the number of threads. If you put that part in the wait()-loop it's possible that 2 threads signal the condition at the same time, leading to missing some threads (which will turn the wait()-loop into an endless loop...)
<br />
<br />Please note that this will only work if the thread does not get cancelled. To make sure the code gets always called it's better to install a cleanup handler (see pthread_cleanup_push()) immediately after starting the thread.
<br />
<br />Please drop me a note if I missed anything there.Updates...
http://bwachter.lart.info/#133
It's been a long while since my last posts. I collected much stuff to publish in that time, and I'm currently going over all that stuff to correct errors -- or dump it if it's outdated by now. Expect a bunch of postings to different topics over the next days.Innenministerium hält Prüfberichte von elektronischen Wahlmaschinen unter Verschluss
http://bwachter.lart.info/#131
-</p><blockquote><p>Das Bundesinnenministerium (BMI) will Prüfberichte von elektronischen Wahlmaschinen, die bei der Bundestagswahl am Sonntag zum Einsatz kommen, nicht veröffentlichen. Auf Anfrage des Physikers Dr. Ulrich Wiesner erklärte das zuständige Referat V3, eine Veröffentlichung der Prüfberichte nehme das Ministerium zum Schutz des Firmen-Know-hows des Herstellers nicht vor.</p></blockquote><p>-
<br />
<br />aka `die Dinger waren scheissteuer, taugen aber auch nicht mehr als die <a href="http://blackboxvoting.org/">Diebold-Maschinchen</a> der Amis'? Wahlmaschinen gehoeren eindeutig zu Bereichen in denen ich von Blackboxen absolut nix halte.
<br />
<br /><a href="http://www.heise.de/newsticker/meldung/64013">Meldung bei heise.de</a>Islamic terrorists crashed my newsserver
http://bwachter.lart.info/#130
On 9/11 (!) my <a href="nntp://news.pimp.lart.info">newsserver</a> suddenly got `a bit' unstable, i.e. crashed every few minutes. Attaching strace to the newly started server process gave the following:
<br />
<br />[...]
<br />open("/var/spool/news/overview/a/r/i/alt.religion.islam.DAT", O_RDWR|O_APPEND|O_CREAT, 0664 <unfinished ...>
<br />+++ killed by SIGSEGV +++
<br />
<br />The fix was pretty simple -- offline xfs_check made the file readable again. It even contained useable content. Overview file for an islamic newsgroup, causing crashs on 9/11 -- coincidence? Or an attack targeted directly at my poor inn? Conspiracy theories are welcome... Re: rc
http://bwachter.lart.info/#129
hell,
<br />
<br />thanx four your .rcrc example. I often use rc on busy servers like m-net.
<br />maybve you come to 22C3 in Berlin?
<br />
<br />
<br />[WTH] 1
http://bwachter.lart.info/#128
Day 1 is over. I have been unable to visit all the talks I wanted to, but met many old friends (and met some of the people I know from IRC irl for the first time). There was time for some pretty interesting discussions, as well as helping some people getting their stuff to work.
<br />
<br />By now I got power _and_ network in my tent (cat5 -- thanks for the cable ;) ), which means I can write this lines out of my sleeping bag. At about 11 it gets too hot in here to stay in longer -- but there's much more interesting stuff to see outside the tent anyway.
<br />
<br />It rained again today -- harder than yesterday. Fortunately my old tent seems to be in a way better condition than I'd expected it to be -- no water except the few drops I brought in in clothing inside of the tent. I guess it will stay so for the rest of the camp -- fine. Except for a very few ants who prefer my dry tent to the outside it's quite comfortable in here.
<br />
<br />Networking seems to be working reliable by now -- at least IPv4, at least using cable. WLan ist pretty much broken, sometimes it works, more often it doesnt. v6 does not appear to be routed at the moment, which is a bit annoying since all boxes I'd like to reach are both v6 and v4 -- resulting in timeouts, without manually removing the v6-address. At least they shot the idiot who kept running a second (inofficial) radvd.
<br />
<br />I managed to show up at the speakers desk this morning, as expected nothing has changed, talk stills on Sunday, ... -- let's see if CCCB will manage something like that on day, too. Releasing a final schedule some time _after_ the event has finished is not the right way... ;)
<br />
<br />I don't know what to do tomorrow. Would be fun to see what they mean by `Morning Practicalities' -- but it seems to be targeted mostly at the masochists among the hackers. 9:30 in the morning -- hey, the nicest talks start when the program is over, and I'd like to have a shower in the morning. Later that day there are some quite interesting talks, more about it tomorrow if I managed to attend to the one I wanted... [WTH] -1
http://bwachter.lart.info/#127
We arrived at the campground yesterday (official program starts today) und put up our tents as soon as possible. Wise thing, it started raining pretty soon after, which resultet in helping friends to put up their tents before everything gets wet.
<br />
<br />Till now nothing special, the usual get-together with friends, phones (DECT via POC) work just as expectet, network does not work just as expected. More to come. If you want to reach me, try +31-411-629-713rc
http://bwachter.lart.info/#126
I stumbled over a <a href="http://www.star.le.ac.uk/~tjg/rc/">UNIX port of plan9-rc</a> while searching for a small shell for DietLinux today. I fell in love with it pretty soon, and changed it to my default login-shell on most systems already.
<br />
<br />The shell is pretty small -- 69k without history/line editing, 120k with history/line editing provided by <a href="http://vons.free.fr/tools/">vrl</a>; both binaries are linked statically against <a href="http://www.fefe.de/dietlibc/">dietlibc</a>.
<br />
<br />I've put my <a href="http://bwachter.lart.info/public/dot_rcrc">.rcrc</a> online, maybe it's useful if you want to try this shell.Easterhegg
http://bwachter.lart.info/#125
I'm now back from easterhegg. I'm tired as hell since I did not sleep much the last 4 nights, but I had pretty much fun.
<br />
<br />My workshops went quite well (at least it seemed to me), and I got some nice feedback from some of the people.
<br />
<br />I'll put up all missing slides for my talks tomorrow. Comments to my talks are still appreciated, I'm planning to do a better version on congress in december. I've been unable to put up the slides today since my notebooks rootfilesystem died yesterday evening -- the DietLinux talk was a bit of a mess due to lack of material caused by the crash, but some people still said they enjoyed it. Maybe it wass better this way, without having too much material I got ready just in time for the official ending.
<br />
<br />I've been unable to attend to most of the workshops I planned to visit -- when I've been out of my workshops people kept me busy with other quite interesting stuff. I propagated some of my earlier ideas, maybe someone will have some time and start doing things I'm too busy for. One of the suggestions was `misusing' the boot PROM of network cards where we can insert big roms (it's no problem to put 16 to 32 MB (!) into the socket of realtek and other cheap cards) to load a fully minimalistic Linux directly from the PROM instead of just putting the PXE agent there.
<br />
<br />I got my fingers on a WLAN phone box from AVM (ISDN, 2ab, WLan, Ethernet, SIP-gateway) and opened it to have a look at the hardware. Some components are a bit proprietary (i.e. you can get datasheets for it, but there are no open source drivers available), but there are other sexy things: It does have a mini pci slot, and it runs Linux. Build kit is partially available, by end of easterhegg people had attached a serial console to it and tried to build custom firmware.
<br />
<br />I did some advocacy for the next MetaRheinMain-chaosdays in may. I guess we'll see some of the people I talked to there, maybe I even got one additional speaker. You'll hear some of my talks again on MRMCDv2.
<br />
<br />UNIX History
http://bwachter.lart.info/#124
The slides for my UNIX history talk at <a href="http://www.easterhegg.de">Easterhegg 2005</a> are now <a href="http://bwachter.lart.info/public/talks/unix_history_eh2005.pdf">online</a>References for daemontools
http://bwachter.lart.info/#123
I recently found a page with references for <a href="http://www.kdegraaf.net/supervise.html">setting up various daemons to run with daemontools</a>. In case you did'nt already know, <a href="http://cr.yp.to/daemontools.html">daemontools</a> is an excellent software package for running/monitoring daemons written by Bernstein.
<br />
<br />However, to monitor a service it's required not to fork into background. It's sometimes not easy to tell an application not to fork. The reference is helpful for a quick overview which parameters make sense for which daemon.Avoid the EU constitution
http://bwachter.lart.info/#122
I'm currently pretty much pissed by the behaviour of the EU council (<a href="http://wiki.ffii.org/Cons050307En">Council Presidency Adopts Software Patent Agreement Against Council's Rules</a>). There has been written much about the patent issue, I don't have to say much more about this. However, I'd like to say some words about the EU constitution which might get approved in the next months.
<br />
<br />If the council can act like this it has way too much power. Giving it more power like the new constitution would do is the wrong way. Don't get me wrong, I'm pro EU, but against the constitution, at least in its current form. The council proved yesterday that they'll bring us into troubles if they get a chance to do so.
<br />
<br />Jonas Maebe has published <a href="http://wiki.ffii.org/OpenLtr050307En">an open letter to the EU</a> at <a href="http://www.ffii.org">ffii</a>. It contains one paragraph about the new constitution:
<br />
<br />-</p><blockquote><p>Relating to the Constitution in particular, I would like to note my concern regarding one specific paragraph, which simply says "Intellectual property shall be protected" (Article II-17). Given that many people consider software patents to be intellectual property, this almost seems to make any directive excluding software patents to become unConstitutional.
<br />
<br />The term "intellectual property" should at least be defined in some way, because everything but the kitchen sink is categorised under that generic term (patents, copyright, trademarks, design rights, digital rights/restrictions management technologies, ...), and things keep getting added. The fallacy that "every idea" has to be someone's "intellectual property" is promoted more and more, which means that such a generic provision is extremely dangerous and may start to conflict quite severely with Article 10 of the European Charter of Human Rights in the near future.</p></blockquote><p>-
<br />
<br />I guess it's already too late to avoid this constitution. I hope it's not. If you get a chance to vote against the constitution please do so.Never install telephone wiring in wet location...
http://bwachter.lart.info/#121
The following warnings were printed on a bag containing the network cable for a d-link device:
<br />
<br />1. Never install telephone wiring during a lighting storm.
<br />2. Never install telephone wiring in wet location unless the wiring is specifically designed for wet locations.
<br />3. Never touch uninsulated telephone wires or terminals unless the telephone line has been disconnected at the network interface.
<br />4. Use caution when installing or modifying telephone lines.Anonymous CVS online
http://bwachter.lart.info/#120
I finally made some sources available using anonymous CVS. I although wrote some notes for <a href="http://bwachter.lart.info./documentation/cvs_chroot.html">setting up a chrooted CVS server</a> -- I'm sick of people complaining that it's sooo hard to set up chrooted CVS, so I'll make a proper howto next weekend. It took me about 15 minutes to get chrooted CVS work -- without documentation, just hacking the stuff together as it made sense. I can't understand how people who seem to have some skills spend weeks on trying to get such a setup work.
<br />
<br />Sources in anonymous CVS will get updated once per day. Current modules in CVS include cuteliner, lobotomi and dietlinux. You can check it out with:
<br />
<br />cvs -d:pserver:cvs@lart.info:/cvs co <module>