From: WATANABE Tetsuya Date: 1998-04-23T11:20:44+09:00 Subject: [ruby-dev:2477] sample/trojan.rb 気がついたのでお知らせします。 ruby 1.1b9_14(98/04/22) [hppa1.1-hpux10.20] 環境の sample です。 ------------------------------ $ diff -u trojan.rb.org trojan.rb --- trojan.rb.org Fri Jan 16 13:05:51 1998 +++ trojan.rb Thu Apr 23 11:11:32 1998 @@ -2,10 +2,10 @@ path = ENV['PATH'].split(/:/) for dir in path - if File.d(dir) + if File.directory?(dir) for f in d = Dir.open(dir) fpath = dir+"/"+f - if File.f(fpath) && (File.stat(fpath).mode & 022) != 0 + if File.file?(fpath) && (File.stat(fpath).mode & 022) != 0 printf("file %s is writable from other users\n", fpath) end end ------------------------------ -- WATANABE Tetsuya HP Japan PSO e-mail tetsu@jpn.hp.com