summaryrefslogtreecommitdiff
path: root/sample/trojan.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-04-24 09:38:43 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-04-24 09:38:43 +0000
commit5691e6ab1fa72b61300ab05dc447981ce764fd31 (patch)
tree5061dcb137f4973dd425ed3ef7c8700d45c7d55e /sample/trojan.rb
parent9ce253a2cfc26cc7a0d2cfeeaf15d6216d522077 (diff)
1.1b9_15
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample/trojan.rb')
-rw-r--r--sample/trojan.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/sample/trojan.rb b/sample/trojan.rb
index 2024da0908d..edf8ee63ced 100644
--- a/sample/trojan.rb
+++ b/sample/trojan.rb
@@ -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