Author: jue Date: 2006-09-24 12:29:05 +0200 (Sun, 24 Sep 2006) New Revision: 1933 Modified: tools/prt-utils/trunk/lib/prtverify/30_suid_sgid.awk Log: prtverify: directories with suid/sgid flags are FATAL now Modified: tools/prt-utils/trunk/lib/prtverify/30_suid_sgid.awk =================================================================== --- tools/prt-utils/trunk/lib/prtverify/30_suid_sgid.awk 2006-09-24 10:27:34 UTC (rev 1932) +++ tools/prt-utils/trunk/lib/prtverify/30_suid_sgid.awk 2006-09-24 10:29:05 UTC (rev 1933) @@ -1,16 +1,28 @@ # # 30_suid_sgid.awk # -# Version 0.1 - 2006-07-24 +# Version 0.1.2 - 2006-09-23 # J�rgen Daubert <jue at jue dot li> -loglevel_ok(INFO) && FILENAME ~ FOOTPRINT { +FILENAME ~ FOOTPRINT { - if ($1 ~ /^...s....../) - perror(INFO, "suid file found: " $3) + if (loglevel_ok(INFO)) { - if ($1 ~ /^......s.../) - perror(INFO, "sgid file found: " $3) + if ($1 ~ /^[^d]..s....../) + perror(INFO, "suid file found: " $3) + + if ($1 ~ /^[^d].....s.../) + perror(INFO, "sgid file found: " $3) + } + + if (loglevel_ok(FATAL)) { + + if ($1 ~ /^d..s....../) + perror(FATAL, "suid directory found: " $3) + + if ($1 ~ /^d.....s.../) + perror(FATAL, "sgid directory found: " $3) + } }