X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=ossec-hids.git;a=blobdiff_plain;f=src%2Fsyscheckd%2Fsyscheck.h;fp=src%2Fsyscheckd%2Fsyscheck.h;h=78cc1c3565e782d004ffd0be0da9a8ba164d4936;hp=3fc56a374e8d16458ad0b78148ae457c43b17849;hb=3f728675941dc69d4e544d3a880a56240a6e394a;hpb=927951d1c1ad45ba9e7325f07d996154a91c911b diff --git a/src/syscheckd/syscheck.h b/src/syscheckd/syscheck.h old mode 100755 new mode 100644 index 3fc56a3..78cc1c3 --- a/src/syscheckd/syscheck.h +++ b/src/syscheckd/syscheck.h @@ -1,6 +1,3 @@ -/* @(#) $Id: ./src/syscheckd/syscheck.h, 2011/09/08 dcid Exp $ - */ - /* Copyright (C) 2009 Trend Micro Inc. * All right reserved. * @@ -10,9 +7,7 @@ * Foundation */ - #ifndef __SYSCHECK_H - #define __SYSCHECK_H #include "config/syscheck-config.h" @@ -21,63 +16,50 @@ /* Notify list size */ #define NOTIFY_LIST_SIZE 32 - /* Global config */ -syscheck_config syscheck; - +extern syscheck_config syscheck; /** Function Prototypes **/ -/* run_check: checks the integrity of the files against the - * saved database - */ -void run_check(); - - -/* start_daemon: Runs run_check periodically. - */ -void start_daemon(); +/* Check the integrity of the files against the saved database */ +void run_check(void); +/* Run run_check periodically */ +void start_daemon(void) __attribute__((noreturn)); /* Read the XML config */ -int Read_Syscheck_Config(char * cfgfile); +int Read_Syscheck_Config(const char *cfgfile) __attribute__((nonnull)); +/* Create the database */ +int create_db(void); -/* create the database */ -int create_db(); +/* Check database for changes */ +int run_dbcheck(void); +/* Scan directory */ +int read_dir(const char *dir_name, int opts, OSMatch *restriction); -/* int run_dbcheck() - * Checks database for changes. - */ -int run_dbcheck(); -/** void os_winreg_check() - * Checks the registry for changes. - */ -void os_winreg_check(); - -/* starts real time */ -int realtime_start(); +/* Check the registry for changes */ +void os_winreg_check(void); -/* Adds a directory to real time monitoring. */ -int realtime_adddir(char *dir); +/* Start real time */ +int realtime_start(void); -/* Process real time queue. */ -int realtime_process(); +/* Add a directory to real time monitoring */ +int realtime_adddir(const char *dir) __attribute__((nonnull)); -/* Process the content of the file changes. */ -char *seechanges_addfile(char *filename); +/* Process real time queue */ +int realtime_process(void); -/* get checksum changes. */ -int c_read_file(char *file_name, char *oldsum, char *newsum); +/* Process the content of the file changes */ +char *seechanges_addfile(const char *filename) __attribute__((nonnull)); -/** Sends syscheck message. - */ -int send_syscheck_msg(char *msg); -int send_rootcheck_msg(char *msg); +/* Get checksum changes */ +int c_read_file(const char *file_name, const char *oldsum, char *newsum) __attribute__((nonnull)); +int send_syscheck_msg(const char *msg) __attribute__((nonnull)); +int send_rootcheck_msg(const char *msg) __attribute__((nonnull)); #endif -/* EOF */