Ervin Hegedus
4b38435a6e
Merge pull request #3117 from airween/v3/eualrangebyfind
...
fix: Changed 'equal_range()' + loop by 'find()' in resolveFirst() methods
2024-07-31 15:46:54 +02:00
Eduardo Arias
a48856822c
Updated included headers to support compilation on Windows (using Visual C++)
...
- most of posix related functions and constants in unistd.h can be
found in io.h in Visual C++
- introduced src/compat/msvc.h to adjust for compiler differences (and
avoid updating code with #ifdef blocks for Windows support)
- removed some included headers that are not needed (both on Unix and
Windows builds)
2024-05-03 23:05:34 -03:00
Eduardo Arias
0cd2f459f3
Address cppcheck suppressions in lmdb
2024-04-28 14:55:49 -03:00
Ervin Hegedus
7c4dcdfa4b
Changed 'euqal_range()' + loop by 'find()' in resolveFirst() methods
2024-03-29 16:32:34 +01:00
Martin Vierula
dc6cce5f0c
refactoring and remove dead code in lmdb
2023-10-24 06:36:18 -07:00
Martin Vierula
34809d8064
Add expirevar support for lmdb
2023-10-10 10:31:52 -07:00
Martin Vierula
118e1b3a44
Support expirevar for in-memory collection
2023-09-29 11:40:03 -07:00
Martin Vierula
af45ccd53f
Fix: lmdb regex match on non-null-terminated string
2023-09-18 08:27:41 -07:00
Martin Vierula
dc2e38e242
Fix memory leaks in lmdb code (new'd strings)
2023-09-17 11:36:08 -07:00
Martin Vierula
2121938c51
Change some parms to reference-to-const to satisfy cppcheck
2023-05-11 15:06:25 -07:00
Danila Vershinin
204908cf50
Prevent segfault for #2755
...
Make transactions no-op if the file handle is invalid
2022-06-09 18:10:26 +03:00
tomasz.ziolkowski
82326ffe2b
shift lmdb initialization to provider constructor which is called only once
2022-04-29 08:06:23 +02:00
tomasz.ziolkowski
00483e4009
swtich singleton to thread safe version
2022-04-28 10:58:27 +02:00
tomasz.ziolkowski
3b50b2634b
remove destructor, close environment only once
2022-03-08 12:27:08 +01:00
tomasz.ziolkowski
1fa95ec2e8
set initialized flag, remove unnecessary semicolon
2022-03-08 11:21:43 +01:00
tomasz.ziolkowski
46f40899e7
Fix parallel lmdb readonly transactions
2022-03-06 15:19:59 +01:00
Howard Chu
a6e1074844
Fix #2601 misuses of LMDB API
...
Only open DBI once, doesn't need closing.
Never reuse a txn handle after commit.
Use MDB_RDONLY for txns that aren't doing any writes
2021-08-09 14:28:54 +01:00
Felipe Zimmerle
3748d62f19
Changes copyright dates on the code
2021-01-19 09:24:37 -03:00
Felipe Zimmerle
f18595f428
Makes regular expression selection on collections key case insensitive
...
This issue was initially reported by @michaelgranzow-avi on #2296 .
@airween made an initial attempt to provide a fixed at #2107 ; As a
consequence of the pull request review - provided by @victorhora,
@zimmerle, and @michaelgranzow-avi - @airween made a second attempt
at #2297 . After reviewing by @martinhsv, @zimmerle, I have absorbed
the essential pieces from @airween patch into this one.
This patch differs from @airween's because @airween's patches were
partially working: Key exclusions with regex weren't covered, same
for anchored variables (e.g. ARGS). During the review, I have
highlighted the importance of having elementary test cases. A simple
test case on ARGS could spot the issue. Since that is an important
fix, I don't want to hold this for one more review cycle; therefore,
I am committing the fix myself.
Thank you all involved in the solution of this very own issue.
2020-12-10 10:05:07 -03:00
Felipe Zimmerle
357c140003
Changens copyright year
2020-01-31 10:32:37 -03:00
Felipe Zimmerle
fe98ce4c7d
Cosmetics: address cppcheck warnings
2020-01-30 18:19:34 -03:00
Felipe Zimmerle
86a5f471a9
Cosmetics: fixed static analysis issues.
2020-01-15 20:35:59 -03:00
Felipe Zimmerle
4e76c6adf0
Renames namespace Variables to variables
2019-03-06 15:53:20 -03:00
WGH
37cf60b8d2
Fix use of deleted Regex copy constructor in LMDB code
...
Bug introduced in ad28de4f. Fixes #2008 .
2019-01-28 16:20:02 -03:00
WGH
ad28de4f14
Refactor regex code
...
This commit fixes quite a few odd things in regex code:
* Lack of encapsulation.
* Non-method functions for matching without retrieving all groups.
* Regex class being copyable without proper copy-constructor (potential UAF
and double free due to pointer members m_pc and m_pce).
* Redundant SMatch::m_length, which always equals to match.size() anyway.
* Weird SMatch::size_ member which is initialized only by one of the three matching
functions, and equals to the return value of that function anyways.
* Several places in code having std::string value instead of reference.
2019-01-18 10:34:01 -03:00
Felipe Zimmerle
ee50fea266
Handling key exceptions on the variable itself
...
This is the first step towords to solve #1697
2018-09-24 16:16:30 -03:00
michaelgranzow-avi
d810de9166
#1818 : Variable names must match fully, not partially; also revert to hash table lookup instead of linear search; add test case
2018-06-26 10:47:03 -03:00
Felipe Zimmerle
e51297b436
Improvements on top of #1787
2018-06-12 15:43:08 -03:00
Ervin Hegedus
edb5993d5f
Fixed LMDB collection errors
2018-06-12 14:47:44 -03:00
Felipe Zimmerle
892beb5360
Refactoring on {global,ip,resources,session,tx,user} collections
...
Now using the same name schema and interface for these "special"
collection.
Fix : #1754 , #1778
2018-05-29 23:48:05 -03:00
Andrei Belov
8285a97460
Fix memory leak in Collections
...
This closes #1729 .
2018-04-05 09:48:51 -03:00
Hegedüs Ervin
8d61a3df90
Fix LMDB compile error
2018-02-28 08:52:40 -03:00
Felipe Zimmerle
eeec7efb68
Renames collection::Variable to VariableValue
2018-02-20 13:40:01 -03:00
Felipe Zimmerle
de7c5c89bb
Using shared var for variables names
2018-02-20 13:40:01 -03:00
Felipe Zimmerle
6f7fdd9493
Using direct variable access instead m_collections
2018-02-20 13:40:01 -03:00
Felipe Zimmerle
082a3e3287
Adds support to SecWebAppID
2017-11-08 09:33:14 -03:00
Felipe Zimmerle
2a5085255e
Using multiple threads in reading logs via rule message example
2017-06-03 16:40:47 -03:00
Felipe Zimmerle
8fbb9e8128
Using pthreads to avoid concurrent access to the collection
2017-06-03 16:07:35 -03:00
Felipe Zimmerle
36ab4b952f
Fix lmdb compilation issue
2017-03-06 15:02:00 -03:00
Felipe Zimmerle
e95efa05cc
Fix assorted memory and static analysis errors
2017-03-06 15:02:00 -03:00
Felipe Zimmerle
f2d149fc5f
Extends the direct access model to other collections
2017-03-06 15:02:00 -03:00
Felipe Zimmerle
59114dd598
Refactoring on the operators parsers (2/2)
...
This is the first step towards remove the memory leaks in the parser
2017-03-06 15:01:50 -03:00
Felipe Zimmerle
e181cb7e0a
Fix lmdb collections backend
2016-12-30 16:43:56 -03:00
Felipe Zimmerle
a7f465cf3a
Avoids string copy by working with pointers while resolving variables
2016-12-28 20:00:14 -03:00
Felipe Zimmerle
168fa22e19
Collections cleanup: removes resolveFirstCopy method
2016-12-28 19:56:27 -03:00
Felipe Zimmerle
6fff8c954a
Performance improvement: makes the collections lookup faster
2016-12-28 19:55:35 -03:00
Felipe Zimmerle
2244e874e2
Moves static methods from class String to the namespace string
2016-11-04 16:00:44 -03:00
Felipe Zimmerle
62a0cb468b
Renames utils/msc_string.[h|cc] to utils/string.[h|cc]
2016-11-04 16:00:42 -03:00
Felipe Zimmerle
4ced1d18e0
Using full path in the header inclusion
2016-11-04 14:45:01 -03:00
Felipe Zimmerle
507ec44cc2
Refactoring on `utils.cc' and adjacents
...
Completely removed the `utils.cc' by moving residual functions into
sub-classes of `utils/'
2016-11-03 20:26:27 -03:00