that sounds like a lot of work…

From alpine‘s alpine-2.00/alpine/mailcmd.c:

                switch(r = is_writable_dir(dir)){
                  case 0:               /* exists and is a writable dir */
                    /*
                     * We could figure out if it is empty and use it in
                     * that case, but that sounds like a lot of work, so
                     * just fall through to default.
                     */

                  default:
:
case 3:               /* doesn't exist, that's good! */
:

Bringing Nothing to the Party

I heard about the book thanks to a post written by @nikan. I read the HTML version of it on my BeBook Mini. What follows are a few thoughts on the book (in no particular order):

While the subtitle of the book reads:

True Confessions of a New Media Whore

It could easily (and more fittingly) read:

“Οὐκ ἐᾷ με καθεύδειν· τὸ τοῦ Μιλτιάδου τρόπαιον”

According to the narrative, Carr spends a lot of his time in Entrepreneur networking events together with very (financially) successful (and famous in certain circles) people:

“I’ve been around the people in this room for my entire working life, and count many of them among my good friends. I’ve written about them in newspapers, and I’ve published their books. I go to their parties, and share their successes and failures. But I’m not one of them . And that’s fine by me.”

(Big personal parenthesis: The above paragraph could easily describe my experience with the Greek Database Mafia. I am a friend of most of them, but not one of them. And that is fine by me too.)

Only it really was not fine by the author. And with “If them, then why not me?” at hand, he proceeds on discussing about his successes and failures (including some personal ones) using sharp British humor, which is kind of helpful when one reads the book on the bus returning home after work. Other than that the book contains useful instructions on how not to kill your angel investor by Power Point and a basic element for success:

– Have a fucking brilliant idea

Ultimately, Paul Carr failed in his quest for while he was committed to the jet-set lifestyle of the entrepreneurs he spent time drinking with, he was not committed to hard work the same way they did. An interesting story, but nothing more.

HOUMF! Con version 0.0 (mind recompilation)

mind recompilation by skotos

Αντιγράφω από το Internet Archive:

Το HOUMF! Con version 0.0 διεξήχθη το Σάββατο 6 Ιανουαρίου 2001 στο Αμφιθέατρο Πληροφορικής στην Πολυτεχνειούπολη Ζωγράφου (Εθνικό Μετσόβειο Πολυτεχνείο). Υπολογίζεται ότι περίπου 150 άτομα συγκεντρώθηκαν εκεί και εξέφρασαν τη βούλησή τους να δοθεί συνέχεια…

Το HOUMF! Con version 0.0 εστίασε την προσοχή του στη συνάθροιση ανθρώπων με κάτι-παραπάνω-από-απλές γνώσεις πληροφορικής και με ενδιαφέροντα στους τομείς ασφάλειας δικτύων/ υπολογιστών και προχωρημένων τεχνικών προγραμματισμού. Βασικός σκοπός ήταν να γνωριστούμε μεταξύ μας καλύτερα και να θέσουμε τις βάσεις για περαιτέρω συνεννόηση και συνεργασία.

Η συνάθροιση αυτή ήταν κρίσιμης σημασίας, καθώς θα έθετε τις βάσεις για τη διοργάνωση ενός πλήρους Con. Τόσο το μικρό χρονικό διάστημα για τη διοργάνωση όσο και η δύσκολα προβλέψιμη ανταπόκριση που θα είχε, κατέστησε το version 0.0 κάτι σαν demo version, ενδεικτικό για τις μελλοντικές προοπτικές.

Η διοργάνωση του version 0.0 ήταν ιδιαίτερα επίπονη, αλλά και διδακτική, καθώς αποτελεί χρήσιμη εμπειρία και παρακαταθήκη για τη διοργάνωση ενός πλήρους HOUMF! Con.

Οι διοργανωτές (aka HOUMFers – houmfers@houmf.org) ήταν (με αλφαβητική σειρά): Budha, databus, DiJ, N3tKick3r, night, Prowler, w0lverine. Τη διοργάνωση υποστήριξαν το HACK.gr και το #/dev/urandom.

It was fun after all…

Ticket to the Con

“SYLK: File format is not valid”

Recently I was involved in a project that required producing a CSV file as output. To convert the output in Microsoft Excel format, I used Google Docs where I uploaded the CSV file and exported it as a .xls. When trying to open the file from Excel, one would get the following (not very helpful) message:

SYLK: File format is not valid

SYLK are files typically used to exchange data between applications. Fortunately, Microsoft has documented the problem:

A SYLK file is a text file that begins with “ID” or “ID_xxxx”, where xxxx is a text string. The first record of a SYLK file is the ID_Number record. When Excel identifies this text at the beginning of a text file, it interprets the file as a SYLK file. Excel tries to convert the file from the SYLK format, but cannot do so because there are no valid SYLK codes after the “ID” characters. Because Excel cannot convert the file, you receive the error message.

The quick workaround to the above is to not use “ID” as the first two characters in the CSV file to be imported. And like the article says, this problem does not occur if the first two letters are lowercase “i” and “d”.

Ah, the joys of report generating. Full of slight annoyances…

TCPMUX – a mostly overlooked TCP service

TCPMUX is described in RFC-1078 (written some 20 years ago). A reference implementation by Network Wizards can be found at ftp://ftp.nw.com/nw/software/tcpmux.c . It is also implemented in DragonFlyBSD’s inetd, NetBSD’s inetd and FreeBSD’s inetd. OpenBSD does not support for it.

The Protocol

A TCP client connects to a foreign host on TCP port 1. It sends the service name followed by a carriage-return line-feed . The service name is never case sensitive. The server replies with a single character indicating positive (“+”) or negative (“-“) acknowledgment, immediately followed by an optional message of explanation, terminated with a . If the reply was positive, the selected protocol begins; otherwise the connection is closed.

The 15+ years I have been a sysadmin I have never seen anyone making a use of it, which is a pity: Most of the time I see fellow sysadmins who want to write a custom daemon, either write it as a standalone server (usually starting with passivesock.c or passiveTCP.c from Comer’s Internetworking with TCP/IP vol.3), or writing is as a simple stdin/stdout application that is started via inetd. The most trivial problem is sometimes more than trivial:

– What port will this application run on?

It seems that 65535 ports is a lot of freedom to choose from and most people want to use “interesting” port numbers (for any definition of interesting). Add firewall policies and router access lists in the picture, you can have a non-technical deadlock in no time!

TCPMUX might be a choice to help simplify / avoid such situations. Any service that supports TCPMUX listens on port 1/tcp and can be forked by inetd(8) (either internally or externally with the help of a tiny server). After all, it can be considered as an “inetd inside inetd” (the classic inetd responding to requests on a port, TCPMUX responding to requests based on the name of the service) and even if you do not want to use TCPMUX, a similar (homegrown) solution might be the answer to keeping your packet filters lean and less complex. It does not have to be less complex than it has to be though. The Wikipedia article on tcpmux clearly identifies risks that come with deploying it. Personally, I view tcpmux as an old and simple TCP RPC mechanism.

Appendix: tcpmux.c

Since the Network Wizards site seems to be down / taken over by some other entity, here is the original tcpmux daemon code (also at github https://github.com/a-yiorgos/tcpmux ):

Continue reading “TCPMUX – a mostly overlooked TCP service”

4’33”

Lefteris explained 4’33” to me late one night while taking a break in the lab. I think it was one of those nights when lab members would work through the night, take a break downtown and then come back again and work till morning. Lately I find myself doing late night coding again and thinking of 4’33” mostly because of this:

In 1951, Cage visited the anechoic chamber at Harvard University. An anechoic chamber is a room designed in such a way that the walls, ceiling and floor absorb all sounds made in the room, rather than reflecting them as echoes. Such a chamber is also externally sound-proofed. Cage entered the chamber expecting to hear silence, but he wrote later, “I heard two sounds, one high and one low. When I described them to the engineer in charge, he informed me that the high one was my nervous system in operation, the low one my blood in circulation.” Cage had gone to a place where he expected total silence, and yet heard sound. “Until I die there will be sounds. And they will continue following my death. One need not fear about the future of music.” The realisation as he saw it of the impossibility of silence led to the composition of 4′33″.

So that’s the sound of silence I am listening to. Wow!

c-client callbacks

* This is mostly for personal copy-paste reasons

Those who take the time to develop applications using UW-IMAP (or Panda IMAP) know that there are a number of callbacks that need to be defined. What follows is the simplest (do nothing) version of them.

#include "c-client.h"

void
mm_flags(MAILSTREAM *stream,unsigned long number) {
}

void
mm_status(MAILSTREAM *stream,char *mailbox,MAILSTATUS *status) {
}

void
mm_searched(MAILSTREAM *stream,unsigned long number) {
}

void
mm_exists(MAILSTREAM *stream,unsigned long number) {
}

void
mm_expunged(MAILSTREAM *stream,unsigned long number) {
}

void
mm_list(MAILSTREAM *stream,int delimiter,char *name,long attributes) {
}

void
mm_lsub(MAILSTREAM *stream,int delimiter,char *name,long attributes) {
}

void
mm_notify(MAILSTREAM *stream,char *string,long errflg) {
}

void
mm_log(char *string,long errflg) {
}


void
mm_dlog(char *string) {
}

void
mm_login(NETMBX *mb,char *user,char *pwd,long trial) {
}

void
mm_critical(MAILSTREAM *stream) {
}

void
mm_nocritical(MAILSTREAM *stream) {
}

long
mm_diskerror(MAILSTREAM *stream,long errcode,long serious) {
}

void
mm_fatal(char *string) {
}