Changeset 68 for trunk/src/sh_suidchk.c
- Timestamp:
- Oct 30, 2006, 12:03:44 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_suidchk.c
r61 r68 146 146 static int ShSuidchkSeverity = SH_ERR_SEVERE; 147 147 static char * ShSuidchkExclude = NULL; 148 static intExcludeLen = 0;148 static size_t ExcludeLen = 0; 149 149 150 150 static time_t FileLimNow = 0; … … 554 554 ) 555 555 ) 556 { 556 { /* way too long routine */ 557 557 558 558 (void) sl_strlcpy (theFile.fullpath, tmpcat, PATH_MAX); 559 theFile.check_mask = sh_files_maskof(SH_LEVEL_READONLY); 560 theFile.reported = S_FALSE; 559 theFile.check_mask = sh_files_maskof(SH_LEVEL_READONLY); 560 theFile.reported = S_FALSE; 561 theFile.attr_string = NULL; 562 561 563 status = sh_unix_getinfo (ShDFLevel[SH_ERR_T_RO], 562 564 thisEntry->d_name, … … 971 973 } 972 974 SH_FREE(tmp); 973 974 } 975 if (theFile.attr_string) 976 SH_FREE(theFile.attr_string); 977 978 } /* end of way too long routine */ 975 979 } 976 980 SH_FREE(tmpcat); 977 981 } 982 978 983 #ifdef HAVE_SCHED_YIELD 979 984 if (ShSuidchkYield == S_TRUE) … … 989 994 } 990 995 #endif 996 991 997 } while (thisEntry != NULL); 992 998 … … 1087 1093 *************/ 1088 1094 1089 int sh_suidchk_set_severity (c har * c)1095 int sh_suidchk_set_severity (const char * c) 1090 1096 { 1091 1097 int retval; … … 1099 1105 } 1100 1106 1101 int sh_suidchk_set_exclude (c har * c)1107 int sh_suidchk_set_exclude (const char * c) 1102 1108 { 1103 1109 SL_ENTER(_("sh_suidchk_set_exclude")); 1110 1104 1111 if (c == NULL || c[0] == '\0') 1105 1112 { … … 1118 1125 SH_FREE(ShSuidchkExclude); 1119 1126 1120 ExcludeLen = (int) sl_strlen(c); 1121 if (c[ExcludeLen-1] == '/') 1122 { 1123 c[ExcludeLen-1] = '\0'; 1127 ShSuidchkExclude = sh_util_strdup (c); 1128 ExcludeLen = sl_strlen (ShSuidchkExclude); 1129 if (ShSuidchkExclude[ExcludeLen-1] == '/') 1130 { 1131 ShSuidchkExclude[ExcludeLen-1] = '\0'; 1124 1132 ExcludeLen--; 1125 1133 } 1126 ShSuidchkExclude = SH_ALLOC((size_t) ExcludeLen + 1);1127 (void) sl_strlcpy(ShSuidchkExclude, c, (size_t)(ExcludeLen + 1));1128 1129 1134 SL_RETURN(0, _("sh_suidchk_set_exclude")); 1130 1135 } 1131 1136 1132 int sh_suidchk_set_timer (c har * c)1137 int sh_suidchk_set_timer (const char * c) 1133 1138 { 1134 1139 long val; … … 1163 1168 } 1164 1169 1165 int sh_suidchk_set_schedule (c har * str)1170 int sh_suidchk_set_schedule (const char * str) 1166 1171 { 1167 1172 int status; … … 1201 1206 1202 1207 1203 int sh_suidchk_set_fps (c har * c)1208 int sh_suidchk_set_fps (const char * c) 1204 1209 { 1205 1210 long val; … … 1218 1223 } 1219 1224 1220 int sh_suidchk_set_yield (c har * c)1225 int sh_suidchk_set_yield (const char * c) 1221 1226 { 1222 1227 int i; … … 1231 1236 } 1232 1237 1233 int sh_suidchk_set_activate (c har * c)1238 int sh_suidchk_set_activate (const char * c) 1234 1239 { 1235 1240 int i; … … 1239 1244 } 1240 1245 1241 int sh_suidchk_set_quarantine (c har * c)1246 int sh_suidchk_set_quarantine (const char * c) 1242 1247 { 1243 1248 int i; … … 1247 1252 } 1248 1253 1249 int sh_suidchk_set_qdelete (c har * c)1254 int sh_suidchk_set_qdelete (const char * c) 1250 1255 { 1251 1256 int i; … … 1255 1260 } 1256 1261 1257 int sh_suidchk_set_qmethod (c har * c)1262 int sh_suidchk_set_qmethod (const char * c) 1258 1263 { 1259 1264 long val;
Note:
See TracChangeset
for help on using the changeset viewer.