Muli Ben-Yehuda's journal

August 31, 2003

OLS PGP key signing party aftermath

Filed under: Uncategorized — Muli Ben-Yehuda @ 5:45 PM

Finally finished signing all of the keys from the OLS PGP key signing party. According to the report, I’m number 58 in the OLS key ring, and according to the latest global key analysis report, I’m number 813 globally. Whee! I’m such a geek of meaningless statistics 🙂

making xemacs shell mode not display ssh passwords

Filed under: Uncategorized — Muli Ben-Yehuda @ 2:01 AM

I keep a list of things to code for fun. Things that annoy me, things
that I feel could be done better, things that have non trivial hack
value and things that people ask me to do. Tonight I fixed one of the
most annoying bugs on the list – yay me! For your geeky perusal
pleasure, here are the details, from an email I sent to friends who
might appreciate the fix:

I use xemacs's shell mode constantly, and the biggest qualm I had with
it is that sometimes it wouldn't hide ssh passwords and force me to
input them in clear text. I finally got fed up with it tonight and
fixed it. Here's how to fix it, in case you use shell mode as
well. (Oleg, you're cc'd as my (e)lisp guru for constructive criticism

First of all, it can be done manually, by calling M-x send-invisible
before inputting the password. But that's troublesome, and why do by
hand something that can be done automatically?

The right way to do it is to add these elisp snippets to your
.xemacs/init.el or equivalent: 

(add-hook 'comint-output-filter-functions

; make shell mode recognize ssh password prompts 
(setq comint-password-prompt-regexp 
      "\\(\\([Oo]ld \\|[Nn]ew \\|^\\|'s \\)[Pp]assword\\|pass?phrase\\):\\s *\\'")


the regexp above should be all on one line. 

Explanation: shell mode uses the comint module for processing process
output. In the comint module, there is a hook,
'comint-output-filter-functions' that is called on each line of
output. Whatever functions are part of that hook will be called on
each line of output. The first elisp snippet above adds
'comint-watch-for-password-prompt' to the functions to be called. 

'comint-watch-for-password-prompt' is a pretty simple function: 

(defun comint-watch-for-password-prompt (string)
  (if (string-match comint-password-prompt-regexp string)
      (send-invisible nil)))

That is, if the string we got as an input parameter matches the
regular expression commint-password-prompt-regexp, call
'send-invisible'. This is where the second snippet above comes into
play - it modifies the default password regexp to recognize ssh's
passwd prompt, which looks something like this's password: 

The regexp originally looked for (ignoring case for simplicity) 'old'
or 'new' or 'beginning of line' and then 'password'. I added "'s" to
the list of prefixes. 

August 30, 2003

2nd time in a week!

Filed under: Uncategorized — Muli Ben-Yehuda @ 10:25 AM

the eagle has landed

Filed under: Uncategorized — Muli Ben-Yehuda @ 8:48 AM

Yesterday morning we saw a great apartment, and by eight in the evening, it was ours. It’s a huge (120 square meters) roomy 2 bedroom apartment, with a living room the size of a soccer field and one bedroom that’s not much smaller. We haven’t decided yet which of the bedrooms will be our bedroom, and which will be our work room. We are renting the apartment for a year (for a pretty low price, yay!) and have an option to rent or buy. Pictures will be posted once we settle in and I lay my hands on a digital camera.

August 29, 2003

enumerating enums

Filed under: Uncategorized — Muli Ben-Yehuda @ 6:36 PM

Yesterday I spent a few hours working on a python script to parse C source code and automagically generate “print functions”[0] for each enum it finds. At first, I tried parsing out enums using regexps, but that turned out to be non trivial. Now I’m thinking it’ll need real parsing, with tokenizing and lexing and the whole shebang. Good chance to play with lex and yacc and their ilk, and someone already wrote a grammar file for C, but if I go that route, there’s not much point in doing it in python and I might as well stick to C. We’ll see.

[0] for example, for

enum someenum { E1 = 3, E2 } 

We would want to generate

static void print_someenum(const someenum e) 
        const char* name;
        switch(e) { 
        case E1: name = "E1"; 
        case E2: name = "E2"; 
        default: name = "eek, unkown value";

        fprintf(stdout, "%s - %d", name, (int)e); 

August 27, 2003

Sitting at the semester’s last algorithmics lesson

Filed under: Uncategorized — Muli Ben-Yehuda @ 11:25 AM

[Tuesday evening]

Even though I usually enjoy Algorithmics lessons, this one is rather boring so far, covering material I’m already familiar with. I printed out at work ESR’s and Rob Landley’s analysis and rebuttal of the amended SCO complaint, and for some masochistic reason I can’t wait to read it. Yet the break is so far away…

One of the good things about algorithmics lectures is that Dudu oftens delves into interesting stories that have a bearing on the subject at hand. A case of in point is the story he just told of the founding of RSA corporation, and how Rivest, Shamir and Adelman came up with the idea of RSA. Unfortunately, whenever he tells such a story, he invariably gets at least one small detail wrong. I don’t know if it’s carelessness, lack of attention to detail, or maybe simplification for the audience’s sake, but the mistakes grate on my nerves. So far I have resisted the temptation the correct him, because it’s always an irrelevant triviality that’s not worth disturbing the flow of the lesson for. Also, I don’t like arguing about details without a reference at hand. Instead of correcting him, I rant to my livejournal and you, gentle reader, get to read…

lunch with Yaniv and Inon

Filed under: Uncategorized — Muli Ben-Yehuda @ 11:23 AM

[Tuesday evening]

Had a good lunch today at Spargo with Yaniv Altshuler and Inon. Yaniv and I have been meaning to meet for a while now, and today it finally happened. Yaniv is getting married in a couple of weeks, and wanted to deliver the invitation personally.

The invitatation was delivered. We talked about many things, and much fun was had. Army jokes flowed freely. The nice (expensive) bottle of wine I ordered contributed to the congenial mood, and I returned to the office nicely plastered.

syscalltrack meeting and work

Filed under: Uncategorized — Muli Ben-Yehuda @ 11:22 AM

[Tuesday evening]

On Saturday, David and Lior from eddiea’s Linux Development Workshop came by and we talked about syscalltrack for a few hours. I explained in excruciating details the details of syscall hijacking in kernel 2.4, and they asked many good questions. This week they are writing a design document on their project, porting syscalltrack to kernel 2.6, and next week work should actually begin.

In the evening, I spent a few hours hacking on the code, fixing various issues that showed up when we went over the code in the morning. I think I fixed a long standing SMP race, where the actual syscall hijack was not being done atomically (plain assignment, as opposed to xchg()). Need to get a hold of an SMP machine to test, but theoretically, I’m happy.

August 26, 2003

Battle Cry

Filed under: Uncategorized — Muli Ben-Yehuda @ 8:39 AM

I usually avoid these “quiz” type thingies, but this one is just too amusing to pass up.

What Is Your Battle Cry?

Hark! Who is that, striding through the plains! It is Mulix, hands clutching gilded boxing gloves! And with an ominous scream, his voice cometh:

“I’m going to turn you into part of my balanced breakfast!”

Find out!
Enter username:
Are you a girl, or a guy ?

created by beatings : powered by monkeys

August 23, 2003

kernel stuff and syscalltrack

Filed under: Uncategorized — Muli Ben-Yehuda @ 11:25 AM

2.6.0-test4 is out, with my trident.c fix. cvs upping as we speak.

Two of the three TAU guys who are working on syscalltrack are on their way here. We are going to go over the syscall hijack code for 2.4 and design how it’s going to happen for 2.5. I hope they read the paper I wrote on 2.4, so we have something to work from…

Next Page »

Create a free website or blog at