#
# Search for world writable directories
#

&pcheck("World Writable files");

$find_results = `find / -perm -0002 -local -print | xargs ls -ld`;
@find_results = split(/\n/,$find_results);

if (defined(@find_results)) {
	&report("WARNING: The following world writable files or directories were found.\n");
	foreach $worldwrite (@find_results) {
		next if ($worldwrite =~ /(tmp|dev)/);
		&report("$worldwrite\n");
	}
	&warn;
} else {
	&passed;
}
