Changeset 68 for trunk/src/sh_suidchk.c


Ignore:
Timestamp:
Oct 30, 2006, 12:03:44 AM (18 years ago)
Author:
rainer
Message:

Update trunk to samhain 2.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_suidchk.c

    r61 r68  
    146146static int     ShSuidchkSeverity = SH_ERR_SEVERE;
    147147static char *  ShSuidchkExclude  = NULL;
    148 static int     ExcludeLen        = 0;
     148static size_t  ExcludeLen        = 0;
    149149
    150150static time_t  FileLimNow        = 0;
     
    554554                    )
    555555                   )
    556             {
     556            { /* way too long routine */
    557557             
    558558              (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
    561563              status = sh_unix_getinfo (ShDFLevel[SH_ERR_T_RO],
    562564                                        thisEntry->d_name,
     
    971973                }
    972974              SH_FREE(tmp);
    973 
    974             }
     975              if (theFile.attr_string)
     976                SH_FREE(theFile.attr_string);
     977
     978            } /* end of way too long routine */
    975979        }
    976980      SH_FREE(tmpcat);
    977981    }
     982
    978983#ifdef HAVE_SCHED_YIELD
    979984    if (ShSuidchkYield == S_TRUE)
     
    989994      }
    990995#endif
     996
    991997  }  while (thisEntry != NULL);
    992998
     
    10871093 *************/
    10881094
    1089 int sh_suidchk_set_severity  (char * c)
     1095int sh_suidchk_set_severity  (const char * c)
    10901096{
    10911097  int retval;
     
    10991105}
    11001106
    1101 int sh_suidchk_set_exclude (char * c)
     1107int sh_suidchk_set_exclude (const char * c)
    11021108{
    11031109  SL_ENTER(_("sh_suidchk_set_exclude"));
     1110
    11041111  if (c == NULL || c[0] == '\0')
    11051112    {
     
    11181125    SH_FREE(ShSuidchkExclude);
    11191126
    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';
    11241132      ExcludeLen--;
    11251133    }
    1126   ShSuidchkExclude = SH_ALLOC((size_t) ExcludeLen + 1);
    1127   (void) sl_strlcpy(ShSuidchkExclude, c, (size_t)(ExcludeLen + 1));
    1128 
    11291134  SL_RETURN(0, _("sh_suidchk_set_exclude"));
    11301135}
    11311136
    1132 int sh_suidchk_set_timer (char * c)
     1137int sh_suidchk_set_timer (const char * c)
    11331138{
    11341139  long val;
     
    11631168}
    11641169
    1165 int sh_suidchk_set_schedule (char * str)
     1170int sh_suidchk_set_schedule (const char * str)
    11661171{
    11671172  int status;
     
    12011206
    12021207
    1203 int sh_suidchk_set_fps (char * c)
     1208int sh_suidchk_set_fps (const char * c)
    12041209{
    12051210  long val;
     
    12181223}
    12191224
    1220 int sh_suidchk_set_yield (char * c)
     1225int sh_suidchk_set_yield (const char * c)
    12211226{
    12221227  int i;
     
    12311236}
    12321237
    1233 int sh_suidchk_set_activate (char * c)
     1238int sh_suidchk_set_activate (const char * c)
    12341239{
    12351240  int i;
     
    12391244}
    12401245
    1241 int sh_suidchk_set_quarantine (char * c)
     1246int sh_suidchk_set_quarantine (const char * c)
    12421247{
    12431248  int i;
     
    12471252}
    12481253
    1249 int sh_suidchk_set_qdelete (char * c)
     1254int sh_suidchk_set_qdelete (const char * c)
    12501255{
    12511256  int i;
     
    12551260}
    12561261
    1257 int sh_suidchk_set_qmethod (char * c)
     1262int sh_suidchk_set_qmethod (const char * c)
    12581263{
    12591264  long val;
Note: See TracChangeset for help on using the changeset viewer.