Changeset 55 for trunk/test/testrun_1c.sh
- Timestamp:
- Aug 17, 2006, 10:31:24 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/testrun_1c.sh
r51 r55 23 23 export BUILDOPTS 24 24 25 MAXTEST= 6; export MAXTEST25 MAXTEST=7; export MAXTEST 26 26 27 27 ## Quarantine SUID/SGID files if found … … 39 39 # 40 40 # SuidCheckQuarantineDelete = yes 41 42 SUIDPOLICY_7=" 43 [ReadOnly] 44 file=${BASE} 45 [SuidCheck] 46 SuidCheckActive = yes 47 SuidCheckExclude = ${BASE}/a/a 48 SuidCheckInterval = 10 49 SeveritySuidCheck = crit 50 SuidCheckQuarantineFiles = no 51 SuidCheckQuarantineMethod = 2 52 SuidCheckQuarantineDelete = yes 53 " 54 55 mod_suiddata_7 () { 56 one_sec_sleep 57 chmod 4444 "${BASE}/a/a/y" 58 chmod 4444 "${BASE}/a/a/a/y" 59 mkdir "${BASE}/a/abc" 60 touch "${BASE}/a/abc/y" 61 chmod 4444 "${BASE}/a/abc/y" 62 } 63 64 chk_suiddata_7 () { 65 one_sec_sleep 66 tmp=`ls -l "${BASE}/a/a/y" 2>/dev/null | awk '{ print $1}'` 67 if [ "x$tmp" = "x-r-Sr--r--" ]; then 68 egrep "CRIT.*POLICY \[SuidCheck\].*${BASE}/a/a/y" $LOGFILE >/dev/null 2>&1 69 if [ $? -eq 0 ]; then 70 [ -z "$verbose" ] || log_msg_fail "${BASE}/a/a/y"; 71 return 1 72 fi 73 egrep "CRIT.*POLICY ADDED.*${BASE}/a/a/y" $LOGFILE >/dev/null 2>&1 74 if [ $? -eq 0 ]; then 75 [ -z "$verbose" ] || log_msg_fail "${BASE}/a/a/y"; 76 return 1 77 fi 78 else 79 [ -z "$verbose" ] || log_msg_fail "${BASE}/a/a/y (suid not kept)"; 80 return 1 81 fi 82 tmp=`ls -l "${BASE}/a/a/a/y" 2>/dev/null | awk '{ print $1}'` 83 if [ "x$tmp" = "x-r-Sr--r--" ]; then 84 egrep "CRIT.*POLICY \[SuidCheck\].*${BASE}/a/a/a/y" $LOGFILE >/dev/null 2>&1 85 if [ $? -eq 0 ]; then 86 [ -z "$verbose" ] || log_msg_fail "${BASE}/a/a/a/y"; 87 return 1 88 fi 89 egrep "CRIT.*POLICY ADDED.*${BASE}/a/a/a/y" $LOGFILE >/dev/null 2>&1 90 if [ $? -eq 0 ]; then 91 [ -z "$verbose" ] || log_msg_fail "${BASE}/a/a/a/y"; 92 return 1 93 fi 94 else 95 [ -z "$verbose" ] || log_msg_fail "${BASE}/a/a/a/y (suid not kept)"; 96 return 1 97 fi 98 tmp=`ls -l "${BASE}/a/abc/y" 2>/dev/null | awk '{ print $1}'` 99 if [ "x$tmp" = "x-r-Sr--r--" ]; then 100 egrep "CRIT.*POLICY \[SuidCheck\].*${BASE}/a/abc/y" $LOGFILE >/dev/null 2>&1 101 if [ $? -ne 0 ]; then 102 [ -z "$verbose" ] || log_msg_fail "${BASE}/a/abc/y"; 103 return 1 104 fi 105 egrep "CRIT.*POLICY ADDED.*${BASE}/a/abc/y" $LOGFILE >/dev/null 2>&1 106 if [ $? -ne 0 ]; then 107 [ -z "$verbose" ] || log_msg_fail "${BASE}/a/abc/y"; 108 return 1 109 fi 110 return 0; 111 else 112 [ -z "$verbose" ] || log_msg_fail "${BASE}/a/abc/y (suid not kept)"; 113 return 1 114 fi 115 } 116 41 117 42 118 SUIDPOLICY_6="
Note:
See TracChangeset
for help on using the changeset viewer.