Commit Graph

4675 Commits

Author SHA1 Message Date
Alexander
dad4507725
[Table sanity check] Integration test for the table (#5147) 2018-08-31 14:49:51 +01:00
Alexander
831becc7d2
[Table sanity check] sanity check for the table logged_in_users (#5144) 2018-08-31 14:48:53 +01:00
Alexander
2b24cf22de
[Table sanity check] sanity check for the table interface_addresses (#5142) 2018-08-31 14:28:26 +01:00
Giorgi Guliashvili
29550c0ecc
[Table sanity check] memory_map (#5146) 2018-08-31 12:15:59 +01:00
Giorgi Guliashvili
e01149d51e
[Table sanity check] programs (#5141) 2018-08-31 10:41:59 +01:00
Filipe Manco
fe5c7d990c
[Table sanity check] sanboxes (#5137) 2018-08-31 10:40:00 +01:00
Giorgi Guliashvili
b5e1cdc81a
[Table sanity check] user_group (#5128) 2018-08-31 10:25:21 +01:00
Mathieu Martin
c7803fdefd Fix typo. It's Comma, not Coma :-) (#5151) 2018-08-30 21:42:13 +01:00
Alexander
723f077c3b
Add quotes for the key and value in assertion messages (#5148) 2018-08-30 18:15:51 +01:00
Giorgi Guliashvili
566dd75671
[Table sanity check] file (#5126) 2018-08-30 18:15:29 +01:00
Alexander
e901bb35e8
Fix up wrong integer types from validating values from the tables (#5133) 2018-08-30 10:56:08 +01:00
Filipe Manco
7214331832
[Table sanity check] time (#5123) 2018-08-30 10:44:37 +01:00
Chris Long
b18c19edae Darwain provisioning script to use /usr/local/bin to avoid SIP violation (#5117) 2018-08-30 10:27:45 +01:00
Filipe Manco
40a770025c
[Table sanity check] process_events (#5132) 2018-08-30 10:02:45 +01:00
mcburrlin
4cb0b2cb57 Typo on Ubuntu 17.04 bento box (#5136) 2018-08-30 09:46:13 +01:00
Filipe Manco
873c6555d0
[Table sanity check] os_version (#5124) 2018-08-30 09:39:43 +01:00
Teddy Reed
7a2bc0bc28
virtual tables: Handle SQLite3 BLOB_TYPE (#5118) 2018-08-29 21:40:33 -04:00
Giorgi Guliashvili
126a5ac92f
errorbase wdeprecated warning fix (#5131) 2018-08-29 20:16:23 +01:00
Giorgi Guliashvili
637d301853
validate rows assert debugging (#5125) 2018-08-29 20:16:00 +01:00
Alexander
f7b5447871
Use just std::function for custom validator in table integration tests (#5129) 2018-08-29 18:48:49 +01:00
Alexander
80bfdf914c
[Table sanity check] Integration tests for deb_packages (#5120)
[Table sanity check] Integration tests for deb_packages
2018-08-29 18:04:15 +01:00
Max Kareta
85d78c768e
[Table sanity check] crontab (#5127) 2018-08-29 16:16:23 +01:00
Alexander
7ed337d008
[Table sanity check] Integration test for the linux kernel modules table (#5121) 2018-08-29 15:13:38 +01:00
Max Kareta
ba1a933b90
[Table sanity check] system info (#5119) 2018-08-29 12:53:38 +01:00
Filipe Manco
59925a2706
[Table sanity check] hash (#5122) 2018-08-29 12:42:19 +01:00
Giorgi Guliashvili
a06af88b18
simplify logger initilization (#5078) 2018-08-29 00:21:59 +01:00
Alexander
8702537fe9
Run 'test_debug' in order to run the tests for debug build (#5092) 2018-08-28 17:35:19 +01:00
Giorgi Guliashvili
d5ccbd1813
treat warnings as error only in the osquery core (#5113) 2018-08-28 17:22:06 +01:00
Alessandro Gario
3082b7cb87 socket_events: Use local_port/local_address for bind() (#5098) 2018-08-28 15:52:36 +01:00
Alexander
6a460f22c7
RAII based scope guard class (#4980)
To be sure that resources are always released/removed/closed/verified/stoped
in face of multiple return statements from the function.
2018-08-28 12:32:02 +01:00
Alexander
dcfe83a0aa
Helper functions tryTake, tryTakeCopy to lookup in key-value tables (#4833)
There are a lot of lookups in the maps the osquery code. Most of them are verbose and not-optimal with check if such key exists in the table before get access. Some of them consists error e.g.:
```c++
    r["uid"] = row.count("uuid") > 0 ? row.at("uid") : "";
```
Introduced code will help to avoid the most of such problems.
2018-08-28 12:31:10 +01:00
Jibola
e05be701ed Expand "opaque" values in system_controls table (#5082) 2018-08-28 11:52:06 +01:00
Alexander
ae09a6e95b
Fix up debug build for InMemoryDatabaseTest (#5086)
Fix up debug build for InMemoryDatabaseTest

  - add checks for return status of the operations
  - fix up check funtion for types in DB
2018-08-28 11:22:57 +01:00
Adrien Schildknecht
d7b701cb2a Implement setThreadName() for FreeBSD (#5097)
FreeBSD supports renaming threads with pthread_np.
The difference with Linux or Darwin is that there's no error code:
  "Because of the debugging nature of this function, all errors that may
   appear inside are silently ignored"
This isn't really a problem because thread names are meant for debugging
and osquery does not check the retun value of `setThreadName()` anyway.

Test plan:
  adrs@freebsd: procstat -t `pidof old_osqueryi`
    PID    TID COMM                TDNAME              CPU  PRI STATE   WCHAN
   7612 100059 osqueryi            -                    -1  152 sleep   ttyin
   7612 100162 osqueryi            -                    -1  152 sleep   uwait
   7612 100163 osqueryi            -                    -1  152 sleep   select
  adrs@freebsd: procstat -t `pidof osqueryi`
    PID    TID COMM                TDNAME              CPU  PRI STATE   WCHAN
   7278 100151 osqueryi            -                    -1  120 sleep   ttyin
   7278 100160 osqueryi            ExtensionWatcher     -1  120 sleep   uwait
   7278 100161 osqueryi            ExtensionRunnerCore  -1  131 sleep   select
2018-08-28 11:11:11 +01:00
Alexander
be73ffe618
Add an rvalue constructor for Expected (#5087)
to be sure that other expected remains with status 'error checked'
2018-08-28 10:53:50 +01:00
ShlomoGood
1103d2cf24 Update flag verbage for TLS tests (#5095) 2018-08-27 09:53:36 -07:00
Giorgi Guliashvili
fd5b103c63
rearrange initLogger disable capabilities (#5077) 2018-08-27 17:33:10 +01:00
Max Kareta
78020a127e
added stubs for sanity checks (#5109) 2018-08-27 17:21:26 +01:00
Giorgi Guliashvili
21228c3172
put config backup feature behind killswitch (#5100) 2018-08-27 17:16:43 +01:00
Max Kareta
63fb35af74
added uptime sanity check (#5108) 2018-08-27 17:00:40 +01:00
Max Kareta
5dc0e5a7d5
added integration tests target and helper functions to tests table sanity (#5107) 2018-08-27 15:25:28 +01:00
Allan Liu
a17d6b5963 SMBIOS oem_strings table (#4849) 2018-08-22 20:02:40 -04:00
Teddy Reed
affb48f7db
deps: Update Vagrant macOS target to 10.13 (#5073) 2018-08-22 20:00:58 -04:00
Giorgi Guliashvili
5f9552fa0e
writeTextFile optional mode argument (#5081) 2018-08-22 14:23:01 +01:00
Alexander
c5b8ee2d58
Fix up usage of debug_only::Var in expected assign operator (#5085)
debug_only::Var debug version doesn't have assign operator
2018-08-22 13:27:24 +01:00
Alexander
b6edf00892
Make error messages in Expected check different to distinguish problems (#5088)
Make error messages in Expected check different to know for sure which check is failed.
2018-08-22 13:26:55 +01:00
Giorgi Guliashvili
2a9a9ef666
cleanup after the primary logger concept removal (#5089) 2018-08-22 01:58:00 +01:00
Giorgi Guliashvili
81d53394fa
unused code after refactor (#5083) 2018-08-21 21:25:48 +01:00
Giorgi Guliashvili
dc3bb9ebba
remove unused force_permissions (#5080) 2018-08-21 20:58:52 +01:00
Max Kareta
cbfcd875cd
disk_encryption macOS, fix for issue #4658 (#4691) 2018-08-21 18:45:56 +01:00