checkpassword / cmd5checkpw

How to check checkpassword (this will launch “id” when authenticated):
% perl -e ‘printf “%s\0%s\0Y123456\0″,”real-user”,”password”‘ | /bin/checkpassword id 3<&0
And for cmd5checkpw:
% perl -e ‘printf “%s\0%s\0%s\0″,”user-in-plaintext”,”challenge-in-plaintext”, “response-in-hex” ‘ | /bin/cmd5checkpw id 3<&0
I’ve found that md5c.c distributed with cmd5checkpw doesn’t work correctly on x86_64 (amd64) architecture, and this problem can be solved by getting md5c.c + md5.h + config.h (we need to run ./configure script once) from fetchmail tarball.
Just one more thing: how to check cram-md5/plain/login auth by telnet (in Japanese):
http://nai.homelinux.net/telnet_smtp_auth.html

TdF ’08 とか

久々に自転車で出勤した。乗った瞬間、うわ、俺の自転車ってこんなにハンドル遠かったっけ、とか、ロードレーサーってこんなに硬い乗り物だっけ、と思った。でも、家の前の通りから大通りに出て、ぐっと踏んだ瞬間にカーンと加速するのは気持ちよかった。自転車は自由だ! とよく言うけど、まっくその通りです。
そして帰りはおしりが痛かった(笑)。まあ、これは、しばらく乗れば慣れるんだけど、そこまで乗ってなかったか、と思うと情けない。
今年は帰りの上着として、フリースの薄手のトレーナーみたいなやつを着てみたんだが、暑すぎなくてけっこういい感じ。ま、いまの大学から家まで 10km もないからの話で、前の職場からだったらやっぱり、途中で脱いでたかもしれないけどね。
で、早く帰ってきて、prosou.nu の新しいサーバのセットアップ中。
去年の Tour de France の DVD を画面の隅っこで再生してる。
激熱い。

安曇野

忙しくて書けなかったが、一昨日あたり読み終えました。
次はどうしようかなあ、と思うが、しばらく忙しいので生活の文化レベルを下げるか(笑)。

チャリ復活

昨日ようやく冬物のチャリ手袋を買った。
最近笑っちゃうくらい忙しくて自転車を整備するヒマも、自転車屋に行く暇もないんだ。手袋は、恵比寿の駅前の mont-bell で買った。はじめて行ったんだが、自転車関係もなかなかいい感じのものを作っており、しかも安いんだ。シューズカバーがボロボロだからそろそろ買おうかな、と思った。
で、手袋を買って、自転車に乗れるようになったので、今日から通勤時間が 1/3 に圧縮です。わーい。だいぶ汚れてるんだが、チェーンその他に注油して、変速機のワイヤテンションを調整したら、とりあえず乗れそう。
去年はなんか、後半ほとんど自転車に乗れなくて、今年はメーターが 5682.8km からスタート。
今年もがんばろう。

初出張

1/4 からは長崎大へ出張。往路は列車で、復路は飛行機。
ところが、電車にのって気づいてみると、カバンのストラップの金具がすり減って、とんでもないことになっている。
DSCN1676.JPG
これ、もう片方は先日渋谷を歩いているときに破断してカバンが落ちてしまい、中に入っていた MacBook のフタが若干ずれる、という悲しいできごとがあったのだけれど、こっち側もそろそろ限界。こうなったら折れるぞ!という感じですね。
そういうわけで、渋谷のビックカメラに寄って、カメラ用のストラップを購入して取り付け。カメラ用ストラップは、300/2.8 みたいな重たいレンズだって吊れるわけだし、取り付け部が繊維性なので、カバン側の金具に対する攻撃性も低くていい感じだ。そういえば、学生時代にはいつも Nikon のストラップをカバンにつけてたなあ。
それで、肝心の出張ですが、長崎大でデバッグの手伝い。歴代の先輩方が遺していったバグを片っ端からやっつけ、最後は僕のバグが出てきてしまい (笑)、そしてとうとう動くようになりました。やっぱり、バグがとれてズバッと動く瞬間は気持ちいいね。これは、ソフトウェアの人には一生体験できない、ハード屋だけの特別な瞬間。
DSCN1677.JPG
かっこいい論文書けるといいなー。

元旦初出勤

DSCN1671.JPG
元旦から、というか、大晦日から仕事だったわけですが、職場のある吉祥寺には大きな神社があって、初詣の人たちがすごかった。
DSCN1672.JPG
DSCN1673.JPG
年末に、ヨドバシカメラに頼んでおいた愛用のヘッドフォンの ear pad が届いたのが、今年最初の買い物。2500円也。交換はけっこう力仕事、というか、神経を使った。片方やってしまえばコツがわかるので、もう片方は簡単なんだけどね。

GTK+-2.14.6 / Win32 cross build environment on MacOS X

I also have to have GTK/Windows building environment… I have an old one on my MacBook, but I decided to make a new environment on my MacBook (with Leopard / Core2Duo processor) from scratch.
[ Prepare ]
Here’s what I’ve downloaded.
– MinGW runtime (mingwrt-3.15.1-mingw32.tar.gz)
– MinGW Win32 API (w32api-3.13-mingw32-dev.tar.gz)
– Win32 developer’s all-in-one bundle from GTK Website here.
– binutils-2.19.tar.bz2, gcc-core-4.2.4.tar.bz2, gcc-g++-4.2.4.tar.bz2
[ Unpack basic packages ]
% cd mingw
% tar xzf archives/mingwrt-3.15.1-mingw32.tar.gz
% tar xzf archives/w32api-3.13-mingw32-dev.tar.gz
[ Unpack GTK ]
% mkdir GTK
% cd GTK
% unzip ../archives/gtk+-bundle_2.14.6-20081216_win32.zip
Fix pkg-config .pc files for my directory configuration:
% cd GTK/lib/pkgconfig
% foreach i ( *.pc )
foreach? sed -e “/^prefix/c\\
prefix=/Users/yasu/mingw/GTK” -i \~ $i
foreach? end
[ build binutils ]
I did this at outside my mingw root.
% mkdir build-binutils-2.19
% cd build-binutils-2.19/
% ../binutils-2.19/configure –prefix=/Users/yasu/mingw –target=i386-pc-mingw32
% make && make install
[ build gcc + g++ ]
% mkdir build-gcc-4.2.4
% cd build-gcc-4.2.4
% ../gcc-4.2.4/configure –program-prefix=i386-pc-mingw32- –program-suffix=-4.2.4 –with-gcc –with-gnu-ld –with-gnu-as –target=i386-pc-mingw32 –prefix=/Users/yasu/mingw –enable-threads –disable-nls –enable-languages=c,c++ –disable-win32-registry –disable-shared –enable-sjis-exceptions –with-headers=/Users/yasu/mingw/include –with-libs=/Users/yasu/mingw/lib –with-build-time-tools=/Users/yasu/mingw/bin
% make && make install
This may require automake, autoconf and bison. I have them build with MacPorts.
I hope all these stuff work, but I’m not tested yet.

GTK+-2.4.16 Universal Package: Now trying again.

Now try with native 10.4/ppc & 10.4/i386 Macs. Thanks to Prof. Sakakibara: he’s contributed a CoreDuo Mac for my software development.
[ Contents ]
Here’s the list of what I’ve downloaded (most links are to Japanese mirrors).
pkg-config-0.23
libiconv-1.12
gettext-0.17
libxml2-2.6.30
glib-2.18.3
atk-1.25.2
libpng-1.2.34
jpeg.v6b
tiff-3.8.2
pixman-0.13.2
freetype-2.3.7
fontconfig-2.6.0
renderext-0.9
renderproto-0.9.3
libXrender-0.9.4
libXft-2.1.13
cairo-1.8.6
jasper-1.900.1
pango-1.22.4
gtk+-2.4.16
[ Patches & Workarounds ]
jpeg & jasper: included libtool is too old… replacing by libtool bundled in MacOS X.
% cp /usr/bin/glibtool libtool
% ./configure (maybe we don’t need this)
% ./configure –enable-shared –prefix=/opt/gtk
It is reasonable that jpeg.v6b includes an old libtool, but I can’t understand why jasper has…
libXrender: MacOS X 10.4 doesn’t provide x11.pc nor xproto.pc. Also it doesn’t have Xregion.h (but MacPorts has).
% sed -i \~ -e “/Requires.private: x11/d;s/ *x11//g;s/ *xproto//g;/^Cflags/s/$/ -I\/usr\/X11R6\/include/;/^Libs/s/$/ -L\/usr\/X11R6\/lib -lX11/” xrender.pc.in
% cp /opt/local/var/macports/sources/rsync.macports.org/release/ports/x11/xrender/files/include/X11/Xregion.h /opt/gtk/include/X11
I’ve already wrote an automated script to build them all, and trying to extend it to an automated “universal” build script.
More to come soon!