Skip to content

Commit dce0e14

Browse files
committed
Merge pull request #21 from wazuh/development
v1.08
2 parents 56b9966 + d9c0f98 commit dce0e14

File tree

14 files changed

+993
-7
lines changed

14 files changed

+993
-7
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4+
## [v1.08] - 2016-05-05
5+
### Added
6+
- Redis decoders and rules.
7+
- Rootchecks for RedHat 7.
8+
- SUDO and SSH decoders.
9+
10+
### Changed
11+
- SSH and OSSEC rules.
12+
- Minor changes in ossec_ruleset.py.
13+
14+
415
## [v1.07] - 2016-04-05
516
### Added
617
- Decoders and rules:

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.07
1+
1.08

ossec_ruleset.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
# OSSEC Ruleset Update
33

4-
# v2.3.1 2016/04/05
4+
# v2.3.2 2016/05/05
55
# Created by Wazuh, Inc. <[email protected]>.
66
77
# This program is a free software; you can redistribute it and/or modify it under the terms of GPLv2
@@ -176,6 +176,12 @@ def get_previous_line(line_search, filepath):
176176
return previous_line
177177

178178

179+
def get_number_lines(filepath):
180+
with open(filepath) as f:
181+
n = sum(1 for _ in f)
182+
return n
183+
184+
179185
def remove_line(line_search, filepath):
180186
for line in fileinput.input(filepath, inplace=True):
181187
if line_search in line.strip():
@@ -448,6 +454,11 @@ def setup_wazuh_directory_structure():
448454

449455
# Check if decoders in wazuh structure
450456
try:
457+
# ossec.conf must be formatted
458+
if get_number_lines(ossec_conf) < 2:
459+
logger.log("\tError checking directory structure: Invalid ossec.conf.\n")
460+
sys.exit(2)
461+
451462
# OSSEC Decoders
452463
# If exists decoder.xml -> Move to /etc/ossec_decoders
453464
old_decoder = "{0}/etc/decoder.xml".format(ossec_path)
@@ -1010,7 +1021,7 @@ def clean_directory():
10101021

10111022
def usage():
10121023
msg = """
1013-
OSSEC Wazuh Ruleset Update v2.3.1
1024+
OSSEC Wazuh Ruleset Update v2.3.2
10141025
Github repository: https://github.com/wazuh/ossec-rules
10151026
Full documentation: http://documentation.wazuh.com/en/latest/ossec_ruleset.html
10161027
@@ -1182,6 +1193,7 @@ def usage():
11821193
restore_backups(backup_name)
11831194
else:
11841195
restore_backups("0")
1196+
restart_ossec = True
11851197
logger.log("\t[Done]")
11861198
else:
11871199
# Setup Wazuh structure: /etc/ossec_decoders/, /etc/wazuh_decoders/, /etc/local_decoders.xml

0 commit comments

Comments
 (0)