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