Changeset 149 for trunk/src/sh_suidchk.c


Ignore:
Timestamp:
Jan 7, 2008, 8:52:13 PM (17 years ago)
Author:
katerina
Message:

Make sh_hash.c thread-safe, remove plenty of tiny allocations, improve sh_mem_dump, modify port check to run as thread, and fix unsetting of sh_thread_pause_flag (was too early).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_suidchk.c

    r143 r149  
    164164
    165165extern unsigned long sh_files_maskof (int class);
     166
     167static void set_defaults (void)
     168{
     169  ShSuidchkActive   = S_TRUE;
     170  ShSuidchkInterval = 7200;
     171  ShSuidchkFps      = 0;
     172  ShSuidchkNosuid   = S_FALSE;
     173  ShSuidchkYield    = S_FALSE;
     174  ShSuidchkQEnable  = S_FALSE;
     175  ShSuidchkQMethod  = SH_Q_CHANGEPERM;
     176  ShSuidchkQDelete  = S_FALSE;
     177  ShSuidchkSeverity = SH_ERR_SEVERE;
     178  if (ShSuidchkExclude != NULL)
     179    SH_FREE(ShSuidchkExclude);
     180  ShSuidchkExclude  = NULL;
     181  ExcludeLen        = 0;
     182
     183  FileLimNow        = 0;
     184  FileLimStart      = 0;
     185  FileLimNum        = 0;
     186  FileLimTotal      = 0;
     187
     188  return;
     189}
    166190
    167191/* Recursively descend into the directory to make sure that
     
    13201344
    13211345
    1322 int sh_suidchk_free_schedule ()
     1346static void sh_suidchk_free_schedule ()
    13231347{
    13241348  sh_schedule_t * current = ShSuidchkSched;
     
    13321356    }
    13331357  ShSuidchkSched = NULL;
    1334   return 0;
     1358  return;
     1359}
     1360
     1361int sh_suidchk_reconf ()
     1362{
     1363  sh_suidchk_free_schedule();
     1364  set_defaults();
    13351365}
    13361366
Note: See TracChangeset for help on using the changeset viewer.