Changeset 373 for trunk/include


Ignore:
Timestamp:
Nov 1, 2011, 9:29:51 PM (13 years ago)
Author:
katerina
Message:

Patch for ticket #265 (inotify). Handling of added subdirectories and file list rescan.

Location:
trunk/include
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/samhain.h

    r367 r373  
    205205#define SH_INOTIFY_DOSCAN   (1<<1)
    206206#define SH_INOTIFY_NEEDINIT (1<<2)
     207#define SH_INOTIFY_INSCAN   (1<<3)
    207208
    208209
  • trunk/include/sh_files.h

    r371 r373  
    2121#define SH_FILES_H
    2222
    23 void sh_audit_mark (char * file);
     23void sh_audit_mark (const char * file);
    2424void sh_audit_delete_all ();
    2525char * sh_audit_fetch (char * file, time_t time, char * result, size_t rsize);
     
    226226
    227227ShFileType sh_files_filecheck (int class, unsigned long check_mask,
    228                                char * dirName,
    229                                char * infileName,
     228                               const char * dirName,
     229                               const char * infileName,
    230230                               int * reported,
    231231                               int rsrcflag);
    232232
    233 int sh_files_search_file(char * name, int * class, unsigned long *check_mask, int * reported);
    234 void sh_files_set_file_reported(char * name);
    235 void sh_files_clear_file_reported(char * name);
     233int sh_files_checkdir (int iclass, unsigned long check_mask,
     234                       int idepth, char * iname,
     235                       char * relativeName);
     236
     237int sh_files_search_file(char * name, int * class,
     238                         unsigned long *check_mask, int * reported);
     239int sh_files_search_dir(char * name, int * class,
     240                        unsigned long *check_mask, int *reported,
     241                        int * rdepth);
     242void sh_files_set_file_reported(const char * name);
     243void sh_files_clear_file_reported(const char * name);
    236244
    237245#endif
  • trunk/include/sh_inotify.h

    r372 r373  
    3232
    3333int sh_inotify_add_watch(char * filename, sh_watches * watches, int  * errnum,
    34                          int class, unsigned long check_mask, int type);
     34                         int class, unsigned long check_mask, int type, int rdepth);
    3535
    36 int sh_inotify_add_watch_later(char * filename, sh_watches * watches, int  * errnum,
    37                                int class, unsigned long check_mask, int type);
     36int sh_inotify_add_watch_later(const char * filename, sh_watches * watches,
     37                               int  * errnum,
     38                               int class, unsigned long check_mask,
     39                               int type, int rdepth);
    3840
    39 char * sh_inotify_pop_dormant(sh_watches * watches, int * class, unsigned long * check_mask, int * type);
     41char * sh_inotify_pop_dormant(sh_watches * watches, int * class,
     42                              unsigned long * check_mask, int * type, int * rdepth);
    4043
    4144void sh_inotify_purge_dormant(sh_watches * watches);
     
    4447
    4548char * sh_inotify_search_item(sh_watches * watches, int watch,
    46                               int * class, unsigned long * check_mask, int * type);
     49                              int * class, unsigned long * check_mask,
     50                              int * type, int * rdepth);
    4751ssize_t sh_inotify_read(char * buffer, size_t count);
    4852ssize_t sh_inotify_read_timeout(char * buffer, size_t count, int timeout);
  • trunk/include/sh_unix.h

    r294 r373  
    307307/* obtain file info
    308308 */
    309 int sh_unix_getinfo (int level, char * filename, file_type * theFile,
     309int sh_unix_getinfo (int level, const char * filename, file_type * theFile,
    310310                     char * fileHash, int flagrel);
    311311
  • trunk/include/sh_utils.h

    r355 r373  
    187187/* check for obscure filenames
    188188 */
    189 int sh_util_obscurename (ShErrLevel level, char * name, int flag);
     189int sh_util_obscurename (ShErrLevel level, const char * name, int flag);
    190190
    191191/* returns freshly allocated memory, return value should be free'd
Note: See TracChangeset for help on using the changeset viewer.