Commit Graph

208 Commits

Author SHA1 Message Date
George Guliashvili
e98f439caf Revert small db optimization
Summary: Revert rocksdb small db optimization for osquery.

Reviewed By: marekcirkos

Differential Revision: D14045578

fbshipit-source-id: baec8f22658844bc202dd099001ea361661d2d72
2019-02-12 12:45:35 -08:00
Max Kareta
188a229d8c fixed double main function
Summary: before this diff osqueryd was relying on linker order to use right main function, since gtest also contains main function

Reviewed By: guliashvili

Differential Revision: D13897622

fbshipit-source-id: d260b7496f513c7052f4db87c8e7ff9300493671
2019-01-31 15:09:12 -08:00
George Guliashvili
a6069b85bc Remove duplication of the target names (#5391)
Summary:
Pull Request resolved: https://github.com/facebook/osquery/pull/5391

Make target names unique

Reviewed By: marekcirkos

Differential Revision: D13785378

fbshipit-source-id: 5bdf02d57ecbf574a1376feb13d07331b43ff89d
2019-01-25 07:23:20 -08:00
Filipe Manco
68cf457709 Make linter happy, remove whitespaces
Summary: Pull Request resolved: https://github.com/facebook/osquery/pull/5376

Reviewed By: jessek

Differential Revision: D13750590

fbshipit-source-id: 230be8e0930b00b80150a21eedf0668411ef6d56
2019-01-21 11:51:55 -08:00
Filipe Manco
a67525fae1 Fix LICENSE information on file headers (#5375)
Summary:
Pull Request resolved: https://github.com/facebook/osquery/pull/5375

LICENSE is now defined in a single file on the root of the project, update the
header to contain that information.

**Project LICENSE did not change.**

Reviewed By: akindyakov

Differential Revision: D13750575

fbshipit-source-id: 1e608a81b260b8395f9d008fc67f463160c1fc2b
2019-01-21 11:51:54 -08:00
George Guliashvili
d498bcbd65 unique target names for xcode (#5328)
Summary:
Pull Request resolved: https://github.com/facebook/osquery/pull/5328

xcode needs unique target names to properly parse buck generated project

Reviewed By: marekcirkos

Differential Revision: D13487400

fbshipit-source-id: cf0c76145344d0873a0973e226d007597a06d17d
2019-01-16 12:28:04 -08:00
micheal-o
7169a1a120 Quick fix in database and disk_encryption (#5273)
Summary:
Fixes #4836
Pull Request resolved: https://github.com/facebook/osquery/pull/5273

Reviewed By: guliashvili

Differential Revision: D13693558

Pulled By: fmanco

fbshipit-source-id: 6160bc54f44c638f00cad745ac70657f58bf38ca
2019-01-16 09:20:23 -08:00
seph
637eb104b8 Spelling (#5256)
Summary:
While running `misspell` on a different codebase. I happened to notice that some misspellings in the osquery code base. So, I fixed them
Pull Request resolved: https://github.com/facebook/osquery/pull/5256

Reviewed By: guliashvili

Differential Revision: D13670897

Pulled By: fmanco

fbshipit-source-id: 5d33d858284955c376e8c3980acdf366d4edf3d3
2019-01-16 08:17:07 -08:00
Max Kareta
8c0c403796 fixed headers_namespace to match file path
Summary: Some tools does not support virtual headers namespaces and expect header path to match actual file path from project root. This diff will fix few namespaces in utils library

Reviewed By: guliashvili

Differential Revision: D13552878

fbshipit-source-id: 2a06f73550c69777bf73be73abdde297fe580583
2019-01-14 03:33:32 -08:00
George Guliashvili
971bee4441 Move build system to BUCK
fbshipit-source-id: 8ffef5e6a393ac67ce56dcb74845402e43d964a0
2018-12-07 16:12:35 +00:00
George Guliashvili
a31d7582f4 Fix rocksdb crash
Configuration of OptimizeForSmallDb was crashing osquery. To be more specific ColumnFamilyOptions::OptimizeForSmallDb part was doing it.
2018-12-07 16:00:46 +00:00
Nick Anderson
0314871908
bug: explicitly set safe permissions on osquery dbs (#5229) 2018-09-18 22:51:29 -07:00
Nick Anderson
bf93fcf2f9
database: changing default path of the database for pathing uniformity (#4832) 2018-09-14 11:36:24 -07:00
Max Kareta
78ba6e0e62
rocksdb implementation part (#4912) 2018-08-20 12:49:56 +01:00
Giorgi Guliashvili
6ff3262139
regex replace (#4847) 2018-08-09 09:55:48 +01:00
Filipe Manco
a841831493 Fix make sync (#4838) 2018-08-08 14:14:13 +01:00
JanEbbing
0cd8283a8a Use putBatch only for multiple puts, fix bug in setDatabaseVal (#4800) 2018-08-06 12:49:07 +01:00
Filipe Manco
be3646672a
Add migration for audit keys (#4779) 2018-08-02 00:20:37 +01:00
Filipe Manco
51a4ed1d25
Improve DB migration error handling and testing (#4777) 2018-07-30 14:25:07 +01:00
Giorgi Guliashvili
94397d3c04
get rid of unnecessary ptree includes (#4727) 2018-07-19 10:45:40 +01:00
Giorgi Guliashvili
d4e444c999
incorrect assumption about reserve behavior (#4728) 2018-07-19 10:44:56 +01:00
Alexander
585e73e1e8
tryTo<> generics for string to integer conversion (#4676)
`tryTo<>` generics for string to integer conversion

The first approach to substitute all `safeStrto*` conversions to `tryTo<>` generics.

Thare are some advantages in using templates here:
  - Destination value type explicitly takes a part in call syntax.
  - You could use it other template code

Also I have removed `safeStrtoi` from the code as an example of usage.
2018-07-12 18:03:57 +01:00
Alessandro Gario
8b864f1935 Improving audit-based table performances (#4647) 2018-07-12 10:10:52 -04:00
Teddy Reed
6d5f94b2c6
flags: Separate flags and flagalias (#4682) 2018-07-10 23:04:39 -04:00
Max Kareta
6ab2a83a61
Refactor/cmake 5 (#4642) 2018-06-26 16:54:08 +01:00
Giorgi Guliashvili
521041ba86
Ephemeral native support for int (#4489)
* Ephemeral native support for int

Ephemeral supports int without serialization.
Dump get and put pushed from database.cpp to the database plugin.
Basic support for rocksDB and sqlite

* status messages

* style and compilation problems fix

* const int& to int for database get

* const int& to int for database put

* more specific exception type of boost variant get

* eohemeral improvements

code repetition reduced
map operations reduced
error message improved
 #everything, next in the following.

* safeStrtoi implementation and use

*  code formatting

* atoi accepts base int type

* error message add to status

* compilation error and format correction
2018-06-06 19:08:23 -07:00
Giorgi Guliashvili
13a5e683f1
rocksDB simplify (#4490)
* rocksDB simplify

unnecessary private variables moved to functions.
Find method replaced by std::find

* reverting back some changes

* code move revert
2018-06-06 12:17:34 -07:00
Max Kareta
93110701d8
reworked cmake file split database plugins files (#4476) 2018-06-02 20:44:58 +01:00
Giorgi Guliashvili
8d7129ee03
Basic db int type support (#4454)
* Basic db int type support

Added API and tests for int types in the database abstraction.

For now, it's just the  wrapper over the string type. In the following commits, will utilize specific database capabilites for additional performance.

* source formatting corrected

* hardened tests
2018-06-02 12:38:29 -07:00
Max Kareta
5aca61375f
reorganized includes to improve compile time (#4445) 2018-05-30 00:17:40 +01:00
Mitchell Grenier
592f7d9fa8 bug: convert empty ptree json to empty RJ lists for db upgrades (#4325) 2018-04-24 13:39:22 -07:00
Nick Anderson
2017068f11
database: updating migration logic from ptree to rapidjson (#4294) 2018-04-17 10:55:58 -07:00
Nick Anderson
9e2515a661
database: convert cached ptree entires to RapidJSON results (#4207) 2018-03-21 09:39:50 -07:00
Teddy Reed
483fbbb594
query: Force query results into proper order (#2947) 2018-01-21 01:20:48 -05:00
Teddy Reed
90a737ead7
Replace most of boost::property_tree with rapidjson (#3910) 2018-01-20 20:58:01 -05:00
uptycs-nishant
1acc7b91ef Reducing memory footprint of osquery by achieving zero-copy (#3977) 2017-12-27 19:43:20 -08:00
Teddy Reed
b86b8c0ba3
rocksdb: Decrease max open database files to 128 from 256 (#4021) 2017-12-27 14:40:42 -08:00
Teddy Reed
f6d077cbf7
license: Change license to Apache 2.0 and GPLv2 (#4007) 2017-12-18 16:04:06 -08:00
Teddy Reed
a7c2669ba3
tidy: Improve clang-tidy (modernize) list of checks and run across codebase (#3870) 2017-10-29 22:25:49 -07:00
Teddy Reed
4d631edac6 rocksdb: Remove manual flush (#3663) 2017-09-08 13:04:44 -07:00
Seshu Pasam
6fab8b6083 logging: adding "counter" to differentiate initial results (#3651)
When setting up alerts for differential logs data you might want to skip the
initial added records. counter can be used to identify if the added records
are all records from initial query of if they are new records. For initial
query results that includes all records counter will be "0". For subsequent
query executions counter will be incremented by 1. When epoch changes, counter
will be reset back to "0".
2017-09-07 15:01:15 -07:00
Teddy Reed
16b40138fe rocksdb: Flush all column families and set max files (#3638) 2017-09-02 12:08:35 -07:00
Teddy Reed
205da3c698 rocksdb: Implement a 'backup' and recover feature for RocksDB (#3635) 2017-09-01 22:31:03 -07:00
Mitchell Grenier
7750fa8ee5 deps: Remove snappy and lz4 (#3545) 2017-08-27 12:02:27 -07:00
Teddy Reed
e4bbf06074 codemod: Refactor query functions out of database (#3615) 2017-08-26 18:36:06 -07:00
Teddy Reed
cf170c4278 cleanup: Move query out of database header (#3576) 2017-08-20 02:44:38 -07:00
Mitchell Grenier
8a963e8d40 [Distributed] Moving to RapidJSON (#3265) 2017-08-07 16:34:44 -07:00
Lambda Conjecture
ecb9e2ccf2 Add Epoch marker to scheduled query results (#3378) 2017-07-07 17:56:03 -07:00
Teddy Reed
99675fdbb2 audit: Increase speed when using socket_events (#3449) 2017-07-02 17:18:40 -07:00
Seshu Pasam
5f732084a2 kDBInitialized should be checked after acquiring lock (#3302) 2017-05-22 20:11:35 -07:00