Commit Graph

147 Commits

Author SHA1 Message Date
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
Alexander Kindyakov
f62a5eb8df Increase the amount of MaxRecvRetries for thrift socket (#5390)
Summary:
Pull Request resolved: https://github.com/facebook/osquery/pull/5390

to eliminate the effect of dropping privileges in other threads causing poll-ing EINTR errors in thrift.

According to ref to [bugzilla.redhat](https://bugzilla.redhat.com/show_bug.cgi?id=473907) in case of changing privileges `glibc` sends SIGRT_1 to other threads which lead to poll be interrupted. On posix we can not have different credentials for thread of one process. Therefore the solution is either to do not use dropping privileges for the whole osquery process or patch all usages of poll in thrift code. I like first option more because playing with permissions of the whole `osqueryd` can cause unpredicted interferences between threads. For instance the same table can provide different results because some other thread dropping and regaining privileges at the same time.

So, the solution for now I'd like to suggest is remove dropping privileges from safe places like reading files with known hostnames or shell history files. And because we can not interact with apt/rpm/yum databases as root and should drop to none user for it I'd suggest to increase the number of attempts to poll in case of EINTR. It can significantly eliminate the problem for now.

To address the problem in issue: [#5326](https://github.com/facebook/osquery/issues/5326)

Thanks fmanco for the help to investigate this problem.

Reviewed By: fmanco

Differential Revision: D13781886

fbshipit-source-id: 4b1f2b7d20c925cc19ba79cc0a2906b65e815c0b
2019-01-23 11:29:05 -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
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
Alexander Kindyakov
f60d2100de fix up extenstions tests on windows
Summary: Windows named pipe requires a bit different name format in compare to posix platforms.

Reviewed By: guliashvili

Differential Revision: D13376805

fbshipit-source-id: 443c8f963863adbacd1edb76945919f00a1a2e4e
2018-12-11 03:31:17 -08:00
George Guliashvili
971bee4441 Move build system to BUCK
fbshipit-source-id: 8ffef5e6a393ac67ce56dcb74845402e43d964a0
2018-12-07 16:12:35 +00:00
Nick Anderson
bf93fcf2f9
database: changing default path of the database for pathing uniformity (#4832) 2018-09-14 11:36:24 -07:00
Filipe Manco
d0486499ea
Log when an extension is registered or dies (#5076) 2018-08-21 10:31:20 +01:00
Giorgi Guliashvili
cf59b05bf4
removed additional unused function signatures (#4844) 2018-08-11 20:24:21 +01:00
Giorgi Guliashvili
4b7e211965
pauseMili to pause transform (#4796) 2018-08-02 16:57:02 +01:00
Giorgi Guliashvili
80bfef9f77
setThreadName boilerplate removal (#4749) 2018-07-23 19:50:35 +01:00
Mitchell Grenier
69d307b64c
Add labels for threads (#4295) 2018-07-23 11:13:43 -07:00
Teddy Reed
6d5f94b2c6
flags: Separate flags and flagalias (#4682) 2018-07-10 23:04:39 -04:00
Max Kareta
a2e1e37219
Refactor/cmake (#4644) 2018-06-26 18:27:24 +01:00
Alexander
6b7ff81ad8
Do not try to decode/encode utf-8 in python extensions (#4617)
osquery itself does not care about unicode validity in table columns,
just takes it "as is". It definetely makes sense, because it could be broken.
But thrift extensions interface for python do it.

If, for instance, shell history contains broken unicode test `python_test_example_queries`
will fail.

```bash
% sed -n '5277p' < ~/.zsh_history | xxd -b                                                                                                                          [146]
00000000: 11000011 10000011 10111111 01101100 01110011 00001010  ...ls.
```
2018-06-22 10:21:11 +01:00
Alexander
a1ba0b1371
Use just unique_ptr instead of shared in ImplExtensionClient (#4498)
There is no intent to shared this objects
2018-06-06 19:26:03 +01:00
Alexander
410bd82eac Fixed up resource releasing order UB in ImplExtensionClient (#4463) 2018-06-04 10:51:50 -07:00
Max Kareta
5aca61375f
reorganized includes to improve compile time (#4445) 2018-05-30 00:17:40 +01:00
Yuan Lei
b95575e260 bug: fix osquery warn for non exist file (#4424) 2018-05-24 16:55:27 +01:00
Teddy Reed
97dae5a56e
sync: Fix sync to handle new fbthrift refactor (#4349) 2018-05-01 19:04:46 -04:00
Teddy Reed
7919791637
fbthrift: Second set of Apache and FbThrift refactors (#4312) 2018-05-01 13:26:10 -04:00
Nick Anderson
305108155a
bug: handle windows service shutdowns gracefully (#4286) 2018-04-18 07:51:04 -07:00
Teddy Reed
2d67bbf482
thrift: Breakout thrift and fbthrift into implementations (#4130) 2018-03-20 15:20:51 -04:00
Nick Anderson
f89392bdb4
extensions: adding autoloading python extensions for Windows (#4096) 2018-02-16 13:56:38 -08:00
Teddy Reed
6f20eced93
thrift: Optionally build and link with fbthrift (#4105) 2018-02-10 23:37:15 -08:00
Teddy Reed
56f9072cb6
deps: Build for thrift 0.11.0 (#4013) 2017-12-23 13:39:13 -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
80cebc8318
extensions: Add 5min timeouts for read and send client calls (#3847) 2017-11-20 07:23:41 -08:00
Teddy Reed
120c0ee62e
Stop latent autoloaded extensions and apply an initial delay (#3944) 2017-11-19 18:56:42 -08:00
Alessandro Gario
58fa4a6899 Verbose logging when spawning services (#3689) 2017-10-24 19:55:05 -07:00
Teddy Reed
205da3c698 rocksdb: Implement a 'backup' and recover feature for RocksDB (#3635) 2017-09-01 22:31:03 -07:00
Teddy Reed
cf170c4278 cleanup: Move query out of database header (#3576) 2017-08-20 02:44:38 -07:00
Nick Anderson
4aa4a983fc Triaging windows auto load extensions; (#3384) 2017-06-09 10:35:40 -07:00
Teddy Reed
70f30b99d8 watcher: Rename instance to get for consistency (#3359) 2017-05-29 17:16:19 -07:00
Teddy Reed
b427310241 deps: Rebuild the world, static and hidden (#3299) 2017-05-21 10:59:19 -07:00
Nick Anderson
95d916e24b [Fix #3268] extensions autoload now correctly spawns extension processes (#3269) 2017-05-11 16:51:48 -07:00
Teddy Reed
ae4cb0ba28 extensions: Catch Thrift transport close exception (#3160) 2017-04-10 22:37:56 -07:00
Teddy Reed
201fbc6707 extensions: Improve extensions and interface headers (#3154) 2017-04-10 08:59:06 -07:00
Teddy Reed
ed2a6b2b6c deps: Update thrift to 0.10.0 (#3127) 2017-04-03 00:06:22 -07:00
Teddy Reed
0ac90e75fa extensions: shell: Check for socket path ownership (#3109) 2017-03-26 21:24:24 -07:00
Teddy Reed
370b319237 Remove include of thrift/TOutput (#3063) 2017-03-13 17:33:42 -07:00
Teddy Reed
f8c16b0316 extensions: Gate access to resource state within Handler (#2975) 2017-02-07 11:45:55 -08:00
Jonathan Lee
a1de136c1a Change logging level in certain cases (#2896) 2017-01-31 08:07:42 -08:00
Teddy Reed
487f7ee59b extensions: Select ephemeral path for shell socket (#2945) 2017-01-27 15:56:40 -08:00
Teddy Reed
f9599d60d0 Move Mutex to shared_timed_mutex and add ReadLock (#2915) 2017-01-15 02:16:40 -08:00
Teddy Reed
0e9733f94c Simplify Registry and plugin concepts (#2887) 2017-01-07 12:21:35 -08:00
Teddy Reed
dcbb32f442 Allow autoload paths to include directories (#2855) 2016-12-08 18:24:01 -08:00
Jonathan Lee
e438971a08 Remove warning message during build (#2824) 2016-12-02 10:44:29 -08:00
Teddy Reed
4fdea34a9d [Fix #2446] Consolidate namedPipe into socketExists (#2712) 2016-11-16 19:32:22 -08:00
Teddy Reed
59f0bad67c Additional compiler checks, including shadow (#2486) 2016-11-06 01:17:04 -08:00