#
# Check the owners of base level directories to make sure root.sys
#  owns them..
#

&pcheck("Ownerships");

opendir(ROOTDIR,"/");
$warn = 0;

while ($file = readdir(ROOTDIR)) {
	@fileperms = &permissions("/$file");

	if (@fileperms[0] != 0) {
		&report("WARNING: Root does not own the file /$file\n");
		$warn = 1;
	}
	if (@fileperms[1] != 0) {
		&report("WARNING: The file /$file is not in a root type group.\n");
		$warn = 1;
	}
}
closedir(ROOTDIR);

if ($warn) {
	&warn;
} else {
	&passed;
}

exit 0;
