summaryrefslogtreecommitdiff
path: root/sample/trojan.rb
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-19 20:56:37 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-19 20:56:37 +0000
commit02a8d06fa8833db3c266663f31a82deb6e89b2d9 (patch)
treef322774139b892603c027ac385f2d6e73852ca77 /sample/trojan.rb
parentc37140b3519fd8028d3b720bbb76c14af2c4e093 (diff)
Improve.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample/trojan.rb')
-rw-r--r--sample/trojan.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/sample/trojan.rb b/sample/trojan.rb
index 6e9b18f..3a35ac2 100644
--- a/sample/trojan.rb
+++ b/sample/trojan.rb
@@ -5,7 +5,7 @@ path = ENV['PATH'].split(File::PATH_SEPARATOR)
for dir in path
if File.directory?(dir)
for f in d = Dir.open(dir)
- fpath = dir+"/"+f
+ fpath = File.join(dir, f)
if File.file?(fpath) && (File.stat(fpath).mode & 022) != 0
printf("file %s is writable from other users\n", fpath)
end