View | Details | Raw Unified | Return to bug 100555 | Differences between
and this patch

Collapse All | Expand All

(-)../Tools/scripts/security-check.awk (-10 / +40 lines)
Lines 34-43 Link Here
34
function print_header() {
34
function print_header() {
35
	if (header_printed)
35
	if (header_printed)
36
		return;
36
		return;
37
	if (audit != "")
37
	if (audit != "") {
38
		print "===> SECURITY REPORT (PARANOID MODE): ";
38
		if (destdir == "")
39
	else
39
			print "===> SECURITY REPORT (PARANOID MODE): ";
40
		print "===> SECURITY REPORT: ";
40
		else
41
			print "===> SECURITY REPORT FOR", destdir, "(PARANOID MODE): ";
42
		}
43
	else {
44
		if (destdir == "")
45
			print "===> SECURITY REPORT: ";
46
		else
47
			print "===> SECURITY REPORT FOR", destdir, ": ";
48
		}
41
	header_printed = 1;
49
	header_printed = 1;
42
}
50
}
43
function note_for_the_stupid(file) { return (file in stupid_binaries) ? (" (USES POSSIBLY INSECURE FUNCTIONS:" stupid_binaries[file] ")") : ""; }
51
function note_for_the_stupid(file) { return (file in stupid_binaries) ? (" (USES POSSIBLY INSECURE FUNCTIONS:" stupid_binaries[file] ")") : ""; }
Lines 46-53 Link Here
46
	for (file in setuid_binaries) {
54
	for (file in setuid_binaries) {
47
		if (!note_printed) {
55
		if (!note_printed) {
48
			print_header();
56
			print_header();
49
			print "      This port has installed the following binaries which execute with";
57
			if (destdir == "") {
50
			print "      increased privileges.";
58
				print "      This port has installed the following binaries, which execute with";
59
				print "      increased privileges.";
60
				}
61
			else {
62
				print "      This port has installed the following binaries into", destdir, ", which";
63
				print "      execute with increased privileges.";
64
				}
51
			note_printed = 1;
65
			note_printed = 1;
52
		}
66
		}
53
		print file note_for_the_stupid(file);
67
		print file note_for_the_stupid(file);
Lines 58-65 Link Here
58
	for (file in network_binaries) {
72
	for (file in network_binaries) {
59
		if (!note_printed) {
73
		if (!note_printed) {
60
			print_header();
74
			print_header();
61
			print "      This port has installed the following files which may act as network";
75
			if (destdir == "") {
62
			print "      servers and may therefore pose a remote security risk to the system.";
76
				print "      This port has installed the following files, which may act as network";
77
				print "      servers and may therefore pose a remote security risk to the system.";
78
				}
79
			else {
80
				print "      This port has installed the following files into", destdir, ", which may";
81
				print "      act as network servers and may therefore pose a remote security risk to";
82
				print "      the system.";
83
				}
63
			note_printed = 1;
84
			note_printed = 1;
64
		}
85
		}
65
		print file note_for_the_stupid(file);
86
		print file note_for_the_stupid(file);
Lines 70-77 Link Here
70
		for (file in startup_scripts) {
91
		for (file in startup_scripts) {
71
			if (!note_printed) {
92
			if (!note_printed) {
72
				print_header();
93
				print_header();
73
				print "      This port has installed the following startup scripts which may cause";
94
			if (destdir == "") {
95
				print "      This port has installed the following startup scripts, which may cause";
74
				print "      these network services to be started at boot time.";
96
				print "      these network services to be started at boot time.";
97
				}
98
			else {
99
				print "      This port has installed the following startup scripts into", destdir, ", which";
100
				print "      may cause these network services to be started at boot time.";
101
				}
75
				note_printed = 1;
102
				note_printed = 1;
76
			}
103
			}
77
			print file;
104
			print file;
Lines 83-89 Link Here
83
	for (file in writable_files) {
110
	for (file in writable_files) {
84
		if (!note_printed) {
111
		if (!note_printed) {
85
			print_header();
112
			print_header();
86
			print "      This port has installed the following world-writable files/directories.";
113
			if (destdir == "")
114
				print "      This port has installed the following world-writable files/directories.";
115
			else
116
				print "      This port has installed the following world-writable files/directories into", destdir, ".";
87
			note_printed = 1;
117
			note_printed = 1;
88
		}
118
		}
89
		print file;
119
		print file;

Return to bug 100555