X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=src%2Frootcheck%2Fcommon_rcl.c;h=4e746665e189b3b10eba94cec70da8cd3a759869;hb=789cbc8e52da68eba3517b920ef22e000cf3c9fd;hp=3677d780cf191d67e27de878905c4cb8a2cd22d8;hpb=6ef2f786c6c8ead94841b5f93baf9f43421f08c8;p=ossec-hids.git diff --git a/src/rootcheck/common_rcl.c b/src/rootcheck/common_rcl.c index 3677d78..4e74666 100755 --- a/src/rootcheck/common_rcl.c +++ b/src/rootcheck/common_rcl.c @@ -355,7 +355,7 @@ char *_rkcl_get_value(char *buf, int *type) */ int rkcl_get_entry(FILE *fp, char *msg, void *p_list_p) { - int type = 0, condition = 0, root_dir_len = 0; + int type = 0, condition = 0; char *nbuf; char buf[OS_SIZE_1024 +2]; char root_dir[OS_SIZE_1024 +2]; @@ -376,12 +376,12 @@ int rkcl_get_entry(FILE *fp, char *msg, void *p_list_p) memset(ref, '\0', sizeof(ref)); - root_dir_len = sizeof(root_dir) -1; + #ifdef WIN32 /* Getting Windows rootdir */ - _rkcl_getrootdir(root_dir, root_dir_len); + _rkcl_getrootdir(root_dir, sizeof(root_dir) -1); if(root_dir[0] == '\0') { merror(INVALID_ROOTDIR, ARGV0); @@ -533,7 +533,7 @@ int rkcl_get_entry(FILE *fp, char *msg, void *p_list_p) } } - + #ifdef WIN32 /* Checking for a registry entry */ else if(type == RKCL_TYPE_REGISTRY) { @@ -551,16 +551,16 @@ int rkcl_get_entry(FILE *fp, char *msg, void *p_list_p) } - #ifdef WIN32 + debug2("%s: DEBUG: Checking registry: '%s'.", ARGV0, value); if(is_registry(value, entry, pattern)) { debug2("%s: DEBUG: found registry.", ARGV0); found = 1; } - #endif - } + } + #endif /* Checking for a directory. */ else if(type == RKCL_TYPE_DIR)