Changeset 367 for trunk/include


Ignore:
Timestamp:
Oct 30, 2011, 9:18:31 AM (13 years ago)
Author:
katerina
Message:

Modifications for ticket #265 (inotify support). Needs testing.

Location:
trunk/include
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/samhain.h

    r295 r367  
    200200#define CLEAR_SH_FFLAG_SUIDCHK(a)   ((a) &= ~SH_FFLAG_SUIDCHK)
    201201
     202/* Flags for inotify
     203 */
     204#define SH_INOTIFY_USE      (1<<0)
     205#define SH_INOTIFY_DOSCAN   (1<<1)
     206#define SH_INOTIFY_NEEDINIT (1<<2)
     207
    202208
    203209/**************************************************
     
    282288  int    audit;
    283289  unsigned long aud_mask;
    284   int    hidefile;                 /* TRUE if file not reveled in log */
     290  int    hidefile;                 /* TRUE if file not shown in log   */
     291  int    inotify;                  /* Flags for inotify               */
    285292} sh_sh_flag;
    286293
  • trunk/include/sh_files.h

    r294 r367  
    221221int sh_files_redef_allignore(const char * str);
    222222
     223ShFileType sh_files_filecheck (int class, unsigned long check_mask,
     224                               char * dirName,
     225                               char * infileName,
     226                               int * reported,
     227                               int rsrcflag);
     228
     229int sh_files_search_file(char * name, int * class, unsigned long *check_mask, int * reported);
     230void sh_files_set_file_reported(char * name);
     231void sh_files_clear_file_reported(char * name);
    223232
    224233#endif
  • trunk/include/sh_inotify.h

    r364 r367  
    1919} sh_watches;
    2020
    21 #define SH_INOTIFY_INITIALIZER { { 0 }, { 0 }, { NULL}, 0, 0 }
     21/* #define SH_INOTIFY_INITIALIZER { { 0 }, { 0 }, { NULL}, 0, 0 } */
     22
     23#define SH_INOTIFY_INITIALIZER { NULL, NULL, 0, 0 }
    2224
    2325int sh_inotify_wait_for_change(char * filename, sh_watches * watches,
    2426                               int  * errnum,   int waitsec);
    2527
    26 int sh_inotify_add_watch(char * filename, sh_watches * watches, int  * errnum);
     28int sh_inotify_rm_watch (sh_watches * watches, sh_watches * save, int wd);
    2729
     30int sh_inotify_add_watch(char * filename, sh_watches * watches, int  * errnum,
     31                         int class, unsigned long check_mask);
     32
     33int sh_inotify_add_watch_later(char * filename, sh_watches * watches, int  * errnum,
     34                               int class, unsigned long check_mask);
     35
     36char * sh_inotify_pop_dormant(sh_watches * watches, int * class, unsigned long * check_mask);
     37
     38void sh_inotify_purge_dormant(sh_watches * watches);
    2839void sh_inotify_remove(sh_watches * watches);
     40void sh_inotify_init(sh_watches * watches);
     41
     42char * sh_inotify_search_item(sh_watches * watches, int watch,
     43                              int * class, unsigned long * check_mask);
     44ssize_t sh_inotify_read(char * buffer, size_t count);
     45int sh_inotify_recheck_watches (sh_watches * watches, sh_watches * save);
    2946
    3047#define SH_INOTIFY_ERROR(a) (a != 0)
Note: See TracChangeset for help on using the changeset viewer.