aboutsummaryrefslogtreecommitdiffstats
path: root/Tools/scripts/security-check.awk
diff options
context:
space:
mode:
authorerwin <erwin@FreeBSD.org>2006-08-04 20:34:50 +0800
committererwin <erwin@FreeBSD.org>2006-08-04 20:34:50 +0800
commit983dc15ba8f877d94d8e2b8c777deb8199f4ec99 (patch)
treeb75af0a340e3a5fb325b96ab4419867bc2a7a996 /Tools/scripts/security-check.awk
parent0aec5ee33513f1341433ac3950105867e7edbae9 (diff)
downloadfreebsd-ports-gnome-983dc15ba8f877d94d8e2b8c777deb8199f4ec99.tar.gz
freebsd-ports-gnome-983dc15ba8f877d94d8e2b8c777deb8199f4ec99.tar.zst
freebsd-ports-gnome-983dc15ba8f877d94d8e2b8c777deb8199f4ec99.zip
Add support for DESTDIR part I.
This commit should largele be a NOOP as it only adds support for DESTDIR undefined. This does allow us to start testing ports with DESTDIR set, but this is as of yet not supported. Although this has been extensively tested on pointyhat, this is a very intrusive change and some cases may have been overlooked. Please contact Gabor and me if you find any. PR: 100555 Submitted by: gabor Sponsored by: Google Summer of Code 2006
Diffstat (limited to 'Tools/scripts/security-check.awk')
-rw-r--r--Tools/scripts/security-check.awk50
1 files changed, 40 insertions, 10 deletions
diff --git a/Tools/scripts/security-check.awk b/Tools/scripts/security-check.awk
index 48746cdb6384..7d6ff1b8b735 100644
--- a/Tools/scripts/security-check.awk
+++ b/Tools/scripts/security-check.awk
@@ -34,10 +34,18 @@ FILENAME ~ /\.writable$/ { writable_files[$0] = 1; }
function print_header() {
if (header_printed)
return;
- if (audit != "")
- print "===> SECURITY REPORT (PARANOID MODE): ";
- else
- print "===> SECURITY REPORT: ";
+ if (audit != "") {
+ if (destdir == "")
+ print "===> SECURITY REPORT (PARANOID MODE): ";
+ else
+ print "===> SECURITY REPORT FOR", destdir, "(PARANOID MODE): ";
+ }
+ else {
+ if (destdir == "")
+ print "===> SECURITY REPORT: ";
+ else
+ print "===> SECURITY REPORT FOR", destdir, ": ";
+ }
header_printed = 1;
}
function note_for_the_stupid(file) { return (file in stupid_binaries) ? (" (USES POSSIBLY INSECURE FUNCTIONS:" stupid_binaries[file] ")") : ""; }
@@ -46,8 +54,14 @@ END {
for (file in setuid_binaries) {
if (!note_printed) {
print_header();
- print " This port has installed the following binaries which execute with";
- print " increased privileges.";
+ if (destdir == "") {
+ print " This port has installed the following binaries, which execute with";
+ print " increased privileges.";
+ }
+ else {
+ print " This port has installed the following binaries into", destdir, ", which";
+ print " execute with increased privileges.";
+ }
note_printed = 1;
}
print file note_for_the_stupid(file);
@@ -58,8 +72,15 @@ END {
for (file in network_binaries) {
if (!note_printed) {
print_header();
- print " This port has installed the following files which may act as network";
- print " servers and may therefore pose a remote security risk to the system.";
+ if (destdir == "") {
+ print " This port has installed the following files, which may act as network";
+ print " servers and may therefore pose a remote security risk to the system.";
+ }
+ else {
+ print " This port has installed the following files into", destdir, ", which may";
+ print " act as network servers and may therefore pose a remote security risk to";
+ print " the system.";
+ }
note_printed = 1;
}
print file note_for_the_stupid(file);
@@ -70,8 +91,14 @@ END {
for (file in startup_scripts) {
if (!note_printed) {
print_header();
- print " This port has installed the following startup scripts which may cause";
+ if (destdir == "") {
+ print " This port has installed the following startup scripts, which may cause";
print " these network services to be started at boot time.";
+ }
+ else {
+ print " This port has installed the following startup scripts into", destdir, ", which";
+ print " may cause these network services to be started at boot time.";
+ }
note_printed = 1;
}
print file;
@@ -83,7 +110,10 @@ END {
for (file in writable_files) {
if (!note_printed) {
print_header();
- print " This port has installed the following world-writable files/directories.";
+ if (destdir == "")
+ print " This port has installed the following world-writable files/directories.";
+ else
+ print " This port has installed the following world-writable files/directories into", destdir, ".";
note_printed = 1;
}
print file;