Sophie

Sophie

distrib > Mandriva > current > x86_64 > by-pkgid > 4eb48b954cf932f6d30c439317814ddd > files > 217

ruby1.9-doc-1.9.1.p378-3mdv2010.1.x86_64.rpm

#! /usr/bin/ruby

path = ENV['PATH'].split(File::PATH_SEPARATOR)

for dir in path
  if File.directory?(dir)
    for f in d = Dir.open(dir)
      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
    end
    d.close
  end
end