1998-01-16 12:13:05 +00:00
|
|
|
#! /usr/local/bin/ruby
|
1999-08-13 05:45:20 +00:00
|
|
|
|
|
|
|
path = ENV['PATH'].split(File::PATH_SEPARATOR)
|
1998-01-16 12:13:05 +00:00
|
|
|
|
|
|
|
for dir in path
|
1999-01-20 04:59:39 +00:00
|
|
|
if File.directory?(dir)
|
1998-01-16 12:13:05 +00:00
|
|
|
for f in d = Dir.open(dir)
|
2002-12-19 20:56:37 +00:00
|
|
|
fpath = File.join(dir, f)
|
1999-01-20 04:59:39 +00:00
|
|
|
if File.file?(fpath) && (File.stat(fpath).mode & 022) != 0
|
1998-01-16 12:13:05 +00:00
|
|
|
printf("file %s is writable from other users\n", fpath)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
d.close
|
|
|
|
end
|
|
|
|
end
|