トップ «前の日記(2006-09-30(Sat)) 最新 次の日記(2006-10-02(Mon))» 編集

屑俺日記

僕の備忘録(PC、UN*X、ネットワーク関連が中心)なんです。
自分の書いたところは適当(な時とか)に書き換えますので御了承を。


2006-10-01(Sun) あしひきの...

openssl-0.9.7と0.9.8

の互換性について、あまり考えてなかった。

openssl-0.9.8d$ grep "^ Change" CHANGES -n6 | head
5: Changes between 0.9.8c and 0.9.8d  [28 Sep 2006]
48: Changes between 0.9.8b and 0.9.8c  [05 Sep 2006]
107: Changes between 0.9.8a and 0.9.8b  [04 May 2006]
150: Changes between 0.9.8 and 0.9.8a  [11 Oct 2005]
187: Changes between 0.9.7h and 0.9.8  [05 Jul 2005]
1009: Changes between 0.9.7k and 0.9.7l  [xx XXX xxxx]

0.9.7と0.9.8の間にうんとたくさんの変更が加えられているって事らしい。
それから、 Changes between 0.9.6h and 0.9.7 [31 Dec 2002]の 中に次のような一文。

NOTE: shared library support is still an experimental thing, and
backward binary compatibility is still not guaranteed.
(ry

opensslのshard library(libcrypto.soとかlibssl.soとか)を 使ってるプログラムは多い。
sshやw3mなんかだけでなく、mod_sslとか、factor(6)とか。
0.9.7を0.9.8にあげたら、そっちも再度コンパイルするのだろうか。

# ln -s libcrypto.so.0.9.8 libcrypto.so.0.9.7 で、 このあいだ動いた筈のfactor(6)は、今回はどうしても動かない...
仕方ないからopenssl-0.9.7lをmakeして、libcrypto.soとlibssl.soだけ (ファイル名の尻尾に.0.9.7をつけて)コピーする。
と動くようになった。

あと、CHANGESをless(1)で見ていて文字化けに気づく。 非ASCII文字が所々に混じっているようだった。

$ wkf -c README
ascii
 
$ wkf -c CHANGES
unknown

firefox-1.5.0.7の共有ライブラリ

/etc/ld.so.confにfirefoxのディレクトリを追加して、 ldconfigしてやった。

$ ldd firefox/firefox-bin | wc -l
49
 
$ ldd firefox/firefox-bin | grep -v firefox | wc -l
38

/usr/games/factorの限界?

$ export BC_LINE_LENGTH=10000
 
$ echo  2^100   | bc | /usr/games/factor | wc
      1     101     233
 
$ echo  2^6799  | bc | /usr/games/factor | wc
      1    6800   15647
 
$ echo  2^6800  | bc | /usr/games/factor | wc
(ry いつ終ることか

1(間に2047字)6: 19 25679 で止まっている。
4時間以上経っても終らなかった。無限ループなんだろうか。

$ tar xvf[z|j] archive path/file

全部解凍しか使ってなかったが、 指定したアーカイブの、指定したパスの、指定したファイルだけを 取り出すこともできるようだ。
ただし、ちょっと時間がかかるかも。
カーネルソースからペンギンのロゴを抽出してみた。

$ time tar xvfj linux-2.6.17.13.tar.bz2 \
  linux-2.6.17.13/Documentation/logo.gif
linux-2.6.17.13/Documentation/logo.gif
 
real    0m48.110s
user    0m46.240s
sys     0m1.865s

FreeBSD-SA-06:22.openssh

Plamoでは既に あげていたが、脆弱性の読解をずっとサボっていた。
/etc/ssh/sshd_configに "Protocol 2"と書けば、とりあえずは防止できそうに見える。
ちなみにFreeBSD-5.3でman 5 sshd_configして見たら、openssh-4.4p1のそれとは 違い、"The default is ``2''."とある。


リンクはご自由にどうぞ。でもURLや内容が変った場合はあしからず。

index.htmlは ここから。