Commit Graph

4892 Commits

Author SHA1 Message Date
Jesse Kornblum
c7355b19aa Update osquery licensing wording (#5452)
Summary:
Pull Request resolved: https://github.com/facebook/osquery/pull/5452

As suggested in another diff, this diff updates the language we use to describe the osquery licensing terms. We are changing all instances of

//This source code is licensed as defined on the LICENSE file found in the root directory of this source tree.//

to

//This source code is licensed in accordance with the terms specified in the LICENSE file found in the root directory of this source tree.//

We accomplish this with a codemod:

  $ codemod -md xplat/osquery/oss --extensions cpp,h,in,py,sh,mm,ps1 "(.\s+)This source code is licensed as defined on the LICENSE file found in the(.*)root directory of this source tree\." "\1This source code is licensed in accordance with the terms specified in\2the LICENSE file found in the root directory of this source tree."

Reviewed By: fmanco

Differential Revision: D14131290

fbshipit-source-id: 52c90da342263e2a80f5a678ecd760c19cf7513e
2019-02-19 10:59:48 -08:00
Jesse Kornblum
56d552d2a4 Add Facebook copyright header to bzl files (#5451)
Summary:
Pull Request resolved: https://github.com/facebook/osquery/pull/5451

This diff adds a Facebook copyright header to the bzl files used in osquery. Ultimately we want to update the files in `tools/build_defs/oss/osquery/`, but those are generated files. This diff updates the source files which we use to generate those files.

Reviewed By: fmanco

Differential Revision: D14131483

fbshipit-source-id: 2230dc382c26530ccd0909882fe6193ee7c674fb
2019-02-19 09:29:31 -08:00
Filipe Manco
484520e1ff Move plugins to a separate directory [4/?] (#5449)
Summary:
Pull Request resolved: https://github.com/facebook/osquery/pull/5449

Initial steps to separate plugins from the rest of osquery. On the long run separating plugins will provide more build flexibility such that we can have configurable builds that include only the bits and pieces we actually need per deployment. Reducing the attack surface, possibility of supply chain attacks, binary size, etc.

Move killswitch

Move test declaration to it's own BUCK file for consistency with the rest of the project.

Reviewed By: marekcirkos

Differential Revision: D14121618

fbshipit-source-id: 3e30e57befed4387585ed553ec087fdf8db6efc3
2019-02-19 07:14:37 -08:00
Filipe Manco
7a8e13c06b Move plugins to a separate directory [3/?] (#5448)
Summary:
Pull Request resolved: https://github.com/facebook/osquery/pull/5448

Initial steps to separate plugins from the rest of osquery. On the long run separating plugins will provide more build flexibility such that we can have configurable builds that include only the bits and pieces we actually need per deployment. Reducing the attack surface, possibility of supply chain attacks, binary size, etc.

Move logger

Reviewed By: marekcirkos

Differential Revision: D14121620

fbshipit-source-id: cef15e7cc354cbe597c6c6878ee63ff09b5fb06d
2019-02-19 07:14:37 -08:00
Jesse Kornblum
4c14814ec3 Relicense yara_utils to Facebook (#5450)
Summary:
Pull Request resolved: https://github.com/facebook/osquery/pull/5450

This file was originally written by wxsBSD in 2015. He has since joined Facebook and has graciously agreed to re-license this file to Facebook. This diff formalizes the relicensing by changing the copyright notice on the file. Note that wxsBSD still retains a copyright to all previous versions of the file.

Reviewed By: wxsBSD

Differential Revision: D14131447

fbshipit-source-id: 3148eafc0162a23b86e064a9784ea01b685164ef
2019-02-19 06:49:50 -08:00
Marek Cirkos
02eeb2a323 Remove duplicated osquery_read_config definitions
Summary: Pull Request resolved: https://github.com/facebook/osquery/pull/5447

Reviewed By: akindyakov

Differential Revision: D14124515

fbshipit-source-id: ab5255c35a4a957ba45dc4e87851ee5c635a55d6
2019-02-19 02:28:20 -08:00
Filipe Manco
2d5572d51e Move plugins to a separate directory [2/?]
Summary:
Initial steps to separate plugins from the rest of osquery. On the long run separating plugins will provide more build flexibility such that we can have configurable builds that include only the bits and pieces we actually need per deployment. Reducing the attack surface, possibility of supply chain attacks, binary size, etc.

Move distributed

Reviewed By: marekcirkos

Differential Revision: D14121619

fbshipit-source-id: 9ad8a837450874e79a819ab4f11258ae24ec8014
2019-02-19 00:55:27 -08:00
Filipe Manco
be07c2938a Move plugins to a separate directory [1/?]
Summary:
Initial steps to separate plugins from the rest of osquery. On the long run separating plugins will provide more build flexibility such that we can have configurable builds that include only the bits and pieces we actually need per deployment. Reducing the attack surface, possibility of supply chain attacks, binary size, etc.

Move config and config_parser plugins

Reviewed By: marekcirkos

Differential Revision: D14119102

fbshipit-source-id: 0bc956398b3829c6f1013b38ebba2f0fc1071a93
2019-02-19 00:55:27 -08:00
Jesse Kornblum
910e46b28f Add Facebook Copyright message to Facebook owned, open-source osquery files (#5445)
Summary:
Pull Request resolved: https://github.com/facebook/osquery/pull/5445

This diff adds a Facebook copyright header to files in the osquery open source repository which:
* Facebook owns
* Do not currently have a Facebook copyright header

Reviewed By: marekcirkos

Differential Revision: D14122845

fbshipit-source-id: 5a0fea10189ec4ec893f7a036911fd51de0e01ae
2019-02-18 13:51:04 -08:00
Mark Mossberg
1a6dd2a6dc system/windows: Correct spelling (#5442)
Summary:
Corrects a spelling mistake in authenticode.
Pull Request resolved: https://github.com/facebook/osquery/pull/5442

Differential Revision: D14100550

Pulled By: SAlexandru

fbshipit-source-id: ed2855e3ca8afa35618033dccbc60a0cd45e4fda
2019-02-15 13:58:26 -08:00
Alexander Kindyakov
676820998e fix up test ProcessOpenFilesTest.test_sanity
Summary: It fails on some platforms because of permissions, let's just check if file path is not empty and is absolute

Reviewed By: marekcirkos

Differential Revision: D14086996

fbshipit-source-id: 98068e4b93e6be12a2392345fa74b547d26a2d43
2019-02-15 07:24:19 -08:00
Filipe Manco
464fa46788 Bump version to 3.3.2 (#5440)
Summary:
Pull Request resolved: https://github.com/facebook/osquery/pull/5440

We're currently on 3.3.2.

Reviewed By: SAlexandru

Differential Revision: D14082297

fbshipit-source-id: 960e4f19ebd5cd0e8b9cdf31fbbd2e64331035d8
2019-02-14 08:22:48 -08:00
George Guliashvili
0da8b0227b Agregate query stats by Min and Sum (#5427)
Summary:
Pull Request resolved: https://github.com/facebook/osquery/pull/5427

Updating query performance monitoring.

Reviewed By: akindyakov

Differential Revision: D14025530

fbshipit-source-id: a50ba0244e0baf83134209258549f86f0717b976
2019-02-14 06:22:45 -08:00
Alexander Kindyakov
51b104823c Fix up flaky tests: FileOpsTests.test_safe_permissions and FileOpsTests.test_safe_db_permissions
Summary: Please never reuse tmp directory with the same name :(

Reviewed By: guliashvili

Differential Revision: D14066968

fbshipit-source-id: 164d0b9e6f34b102759bc5919dadc37197ff0798
2019-02-14 03:51:50 -08:00
Alexandru Stefanica
1621213813 fix magic table (#5438)
Summary:
Pull Request resolved: https://github.com/facebook/osquery/pull/5438

currently the magic table is broken. libmagic which is used to generate this information needs a database/configuration file that it usually auto-finds.
Our libmagic library tries to open the following file ```open("/usr/local/osquery/Cellar/libmagic/5.32_200/share/misc/magic.mgc", O_RDONLY) = -1 ENOENT (No such file or directory)``` (you can generate  this by using strace like ```trace -q -e trace=open ./buck-out/debug/gen/xplat/osquery/oss/osquery/osqueryd#gcc-5-glibc-2.23-clang -verbose -S "select * from magic where path = '/etc/passwd'"```).
How it auto-finds it I don't know 100%, but I guess it has something to with how the libmagic.so is actually build and installed. Basically this never works unless you are a developer on mac and used our previous build system.

I've updated the table to be able to specify the path to magic database file. If you don't specify it, I tried to check if one of the default files (files that should be present under /usr/share/ exists and use the first found). If all fail, I try the default one, but that most likely will fail.

Reviewed By: guliashvili

Differential Revision: D14066467

fbshipit-source-id: d9d2aca4829b2275e6792f974de1f2a7808dc321
2019-02-13 13:58:52 -08:00
Alexander Kindyakov
e7d1a56cfc Rename syscall::Type to syscall::EventType (#5429)
Summary:
Pull Request resolved: https://github.com/facebook/osquery/pull/5429

thanks Alexandru for a question in review :)

Reviewed By: guliashvili

Differential Revision: D13895951

fbshipit-source-id: 66c85a35d53bcf1cc8c5a7b8202bfaa0f03b05a2
2019-02-13 10:55:34 -08:00
Alexander Kindyakov
70d1e25cb2 Move setting up routine of output channels inside LinuxProbesControl class (#5428)
Summary:
Pull Request resolved: https://github.com/facebook/osquery/pull/5428

This is a final diff to be able to track syscalls by using eBPF + kernel events. Basically that one and previous are about to join high level initialisation routine in one place.

Part of a linux  tracing system, blueprint: [#5218](https://github.com/facebook/osquery/issues/5218)

Reviewed By: SAlexandru

Differential Revision: D13801093

fbshipit-source-id: db8503b0d42127281a975ff517600872e9ed4302
2019-02-13 10:55:34 -08:00
Alexander Kindyakov
40a4276b4d Fix up windows (cygwin) specific problem in carver tests (#5437)
Summary:
Pull Request resolved: https://github.com/facebook/osquery/pull/5437

- test should not assume that fs::temp_directory_path() is always the same
- test should clean everithin up in TearDown() method
- tests should no depend on the order (test_decompression previously was depending on test_compression)

Reviewed By: mkareta

Differential Revision: D14064645

fbshipit-source-id: 653e2061c3de8e3fc30a4f0fc553831f22e62fb7
2019-02-13 10:55:34 -08:00
Alexander Kindyakov
59437ee9a5 std::getenv doesn't work for windows sometimes, let's use osquery::getEnvVar instead
Reviewed By: jessek

Differential Revision: D14065193

fbshipit-source-id: 62523b183a87dc8d49eee6e4146cf41825baceeb
2019-02-13 10:55:34 -08:00
Nick Anderson
6075f31393 addressing deadlock regression in windows dispatcher threads (#5421)
Summary:
This addresses a slight regression to ensure that we set `set_terminate_threads` on Windows. Without this flag being set, Windows threads will deadlock on exit as the boost managed io service threads never receive termination notifications.

I'm opening this PR up against the old master as I feel we should likely cut a 3.3.3, and I'm happy to re-open this PR against the upstream experimental as well, but we'll want a fix for this released as quickly as possible to Windows deployments.
Pull Request resolved: https://github.com/facebook/osquery/pull/5421

Reviewed By: marekcirkos

Differential Revision: D13972916

Pulled By: muffins

fbshipit-source-id: 55e3b23c80091d5fb51a97d1efc043b52dc48ba3
2019-02-12 12:59:56 -08:00
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
Jesse Kornblum
5b992021b2 Cleanup grammar, acronyms in CONTRIBUTING (#5432)
Summary:
Pull Request resolved: https://github.com/facebook/osquery/pull/5432

This diff makes some minor changes to the CONTRIBUTING file. Specifically:
* Clean up the grammar in a few places for clarity.
* Spell out some acronyms the first time they are used.

There shouldn't be any changes to the actual ideas presented.

Reviewed By: guliashvili

Differential Revision: D14030423

fbshipit-source-id: 9d7e4d7c6cf4853b7f5695919a675b5716d90f19
2019-02-12 06:04:01 -08:00
Alexander Kindyakov
e44cbe0f3f Add thirdparty [boost] dependency to osquery/utils:utils
Summary: It was apparently missed

Reviewed By: guliashvili

Differential Revision: D13991104

fbshipit-source-id: aadc22de6a679e2ede97c483bbedf17d066ea0ae
2019-02-12 04:08:17 -08:00
Alexander Kindyakov
77279b034f linux tracing probes control (#5419)
Summary:
Pull Request resolved: https://github.com/facebook/osquery/pull/5419

to load new programs, enable native events and attach program to them.

Reviewed By: SAlexandru

Differential Revision: D13787783

fbshipit-source-id: cfc001da15b343e5c80fd0ab6a276f263aa0ef7a
2019-02-11 03:17:37 -08:00
Alexander Kindyakov
760e877ae5 prototype of osquery/plugin_sdk
Summary:
Build osquery extensions/plugins against all osquery is an apparently bad idea.
Because plugins usually are not require full set of thirdparty libs of osquery. Most of osquery code is also not necesarry for plugins. And the main thing, clear definition of public interface of osquery plugins will force us to keep it clear and short, change it carefully and consciously, crate a tests for it.

Reviewed By: fmanco

Differential Revision: D13990668

fbshipit-source-id: ed6ed3f6f75178d829fc6bcbd1af20ef2e268fa8
2019-02-11 02:33:20 -08:00
Alexander Kindyakov
6ee0fd18ea Do not mess with namaspace which comes from thirdparty library (rapidjson) (#5424)
Summary:
Pull Request resolved: https://github.com/facebook/osquery/pull/5424

Let's use `SizeType` definition from rapidjson itself

Reviewed By: marekcirkos, fmanco

Differential Revision: D13986840

fbshipit-source-id: 53b3bf4dcb41c27e2cf18fee3aed97b9e2e42202
2019-02-11 02:33:19 -08:00
Nick Anderson
992d2d3396 ux: adding generated buck config to .gitignore (#5423)
Summary:
As we're expecting to be auto-generating the buck VS toolchain files, we should add this file to the .gitignore, as it'll potentially be system specific.
Pull Request resolved: https://github.com/facebook/osquery/pull/5423

Reviewed By: marekcirkos

Differential Revision: D13973094

Pulled By: muffins

fbshipit-source-id: 98325a4dbe444915d066cd259d9312b09347b080
2019-02-07 09:17:23 -08:00
George Guliashvili
758706331f Remove unused flag enable_monitor
Summary: Removing flag which was declared but never used. enable_monitor

Reviewed By: marekcirkos

Differential Revision: D13958265

fbshipit-source-id: 3a812330950b101abdbd83ada4afd5b262cabd26
2019-02-07 08:16:00 -08:00
George Guliashvili
52ef26e96e Use SQLITE_CONSTRAINT when required constraint does not exist (#5422)
Summary:
Pull Request resolved: https://github.com/facebook/osquery/pull/5422

We were just de-prioritizing type of queries not constraining required columns. However, when the query is just useless without specific constraint, sqlite suggestion is to return SQLITE_CONSTRAINT status.

Reviewed By: marekcirkos

Differential Revision: D13964562

fbshipit-source-id: ee0e5f8baf9abbf83c34f7a39d2b5bd705cbac6d
2019-02-07 03:14:38 -08:00
Max Kareta
a2a37fd6a4 added comments for xcode support
Reviewed By: marekcirkos

Differential Revision: D13957835

fbshipit-source-id: 2ffa94728aaaa3a8a9e5a40d36bf6e7c11393e2c
2019-02-05 08:48:47 -08:00
Max Kareta
6ade85a5f3 fixed crash in virtual table implementaion
Summary:
Fixed crash in virtual tables that occurs after following steps:
1. sqlite opens VT with xCreate
2. during query executions invokes xFilter with multiple tables
3. Few tables accumulated in affectedTables
4. xDestroy called before finishing query (last step of query execution)
5. query execution finished, SQL instance try to cleanup affected tables, but they were already destroyed by xDestory

This is only hotfix for this crash and this code base require full memory management review in future

Reviewed By: SAlexandru

Differential Revision: D13917015

fbshipit-source-id: 15396e47e4c4e592cf30608a783bc80d560c776f
2019-02-05 07:20:00 -08:00
Max Kareta
40742aa582 temp solution for xcode support
Summary:
This diff adds Xcode support for osquery.
Part of this diff will be reverted in future after adding prebuilt library and platform deps support to buck.

To use it you need to build osquery in debug mode and then run buck with following flags:
  --config osquery.xcode=true --config project.ide=xcode

Reviewed By: SAlexandru

Differential Revision: D13903315

fbshipit-source-id: 4d131964d7a61236f25d917dc060a2f3c3d782bc
2019-02-05 07:20:00 -08:00
Max Kareta
13dbc5a887 Do not optimize debug builds
Summary: before this diff we were using -O flag, which equals to -O2, and our debug builds were optimized, which make debug much harder

Reviewed By: fmanco

Differential Revision: D13956134

fbshipit-source-id: b358d8fd68c8f5d51ae6d4c2033e7ec3afdd50d2
2019-02-05 04:35:29 -08:00
Max Kareta
e79d0ae5ce add feature that allow to mark tables foreign at build time
Summary:
Not every environment requires all tables, this diff introduce flag that allows you mark table as foreign. New option should be used in conjunction with target filer.

Example:
> buck build ... --config osquery.target_ignore_list="smart" --config osquery.spec_ignore_list="smart/smart_drive_info.table" -- -S

Reviewed By: fmanco

Differential Revision: D13942107

fbshipit-source-id: fb34d6b7a296f69f6b95bf17bfd19cee31b34dec
2019-02-05 04:03:50 -08:00
Max Kareta
0ee22f3172 added feature that allow ignore specific targets during build
Summary:
Not every environment require all osquery feature, with this diff you can specify targets that you want to ignore, together with all sub tree of deps. To use this you need to specify new osquery config like:
  [osquery]
  target_ignore_list="kafka_producer"

Or from command line:
   --config osquery.target_ignore_list="kafka_producer"

This also includes killswitch that force buck to build all targets. This is needed when you have local buckcofig with ignore list and want to build all without modifying config.
  --config osquery.force_build_all=true

Reviewed By: fmanco

Differential Revision: D13941689

fbshipit-source-id: 3c4e1b4cda4d74f33fb914ba2c3a17df4710d5d3
2019-02-05 04:03:50 -08:00
Alexander Kindyakov
51b35f8664 More assertive sanity check for process abs start time column
Summary: We fixed the meaning of `start_time` in previous PR/diffs, let's check it in the integration test.

Reviewed By: SAlexandru

Differential Revision: D13918628

fbshipit-source-id: 60f4ff74eadfbe286dfb325d713389f01142a0f8
2019-02-05 03:50:20 -08:00
Alexander Kindyakov
9d12502139 Fix up start_time column for macos (#5412)
Summary:
Pull Request resolved: https://github.com/facebook/osquery/pull/5412

Now on different platforms column `start_time` in `processes` table means different things. On Linux it is seconds since system boot, but it works correct only for some platforms, because the number of clock ticks per second was hardcoded. On windows it was abs unix time in seconds since Epoch. On macos it is a time in milliseconds (may be?) since system boot. On freeBSD as far as I can see it an abs time since boot, but also I'm not sure.

In order to make it consistent for all OS we changed to more convenient format - absolute time since Epoch. This commit is about macos.

Reviewed By: marekcirkos

Differential Revision: D13918625

fbshipit-source-id: eacb297358b36ce72cb0d5a7d9171553688ab2a3
2019-02-05 03:50:20 -08:00
Alexander Kindyakov
84b7f4f7a4 Change semantics of 'start_time' colume in processes table (#5414)
Summary:
Pull Request resolved: https://github.com/facebook/osquery/pull/5414

Now on different platforms column `start_time` in `processes` table means different things. On Linux it is seconds since system boot, but it works correct only for some platforms, because the number of clock ticks per second was hardcoded. On windows it was abs unix time in seconds since Epoch. On macos it is a time in milliseconds (may be?) since system boot. On freeBSD as far as I can see it an abs time since boot, but also I'm not sure.

In order to make it consistent for all OS we changed to more convenient format - absolute time since Epoch. This commit is about Linux. Next diffs going to be about Darwin and freeBSD.

Reviewed By: guliashvili

Differential Revision: D13918626

fbshipit-source-id: a9cf0570dc6ac9fa125bc8233e9965c4e01566a6
2019-02-05 03:50:20 -08:00
Alexander Kindyakov
59afbfb3b3 Sanity checks for processess table (#5411)
Summary:
Pull Request resolved: https://github.com/facebook/osquery/pull/5411

Just uncommented sanity checks

Reviewed By: guliashvili

Differential Revision: D13918627

fbshipit-source-id: f3b7f406598f81e6ed55c828a7c1df3da810317f
2019-02-05 03:50:19 -08:00
Max Kareta
8e81e5b259 fixed last gtest direct dependency
Summary: Another fix for multiple mains in osqueryd binary

Reviewed By: guliashvili

Differential Revision: D13901871

fbshipit-source-id: 8802bf8a9de6c333b6c592195435071fcc1b57ca
2019-02-05 03:18:49 -08:00
Alexander Kindyakov
00bb3991ec Let's EbpfTracepoint own the ebpf::Program and tracing::NativeEvent (#5418)
Summary:
Pull Request resolved: https://github.com/facebook/osquery/pull/5418

Part of a linux  tracing system, blueprint: [#5218](https://github.com/facebook/osquery/issues/5218)

Reviewed By: SAlexandru

Differential Revision: D13787759

fbshipit-source-id: 35bb4b41f7cebfeb91aa848a1583c9eae3e2a363
2019-02-05 02:16:54 -08:00
Alexander Kindyakov
fbd5b99231 Class to join exit-enter event pairs (#5417)
Summary:
Pull Request resolved: https://github.com/facebook/osquery/pull/5417

Hash multimap based joiner with ability to perform clean up old unpaired events from time to time.

Part of a linux  tracing system, blueprint: [#5218](https://github.com/facebook/osquery/issues/5218)

Reviewed By: SAlexandru

Differential Revision: D13761675

fbshipit-source-id: f4b17cbeed495b2a9e6616a005f001963849875e
2019-02-05 02:16:54 -08:00
George Guliashvili
6f8b044a4c Use machine identity for monitoring
Summary: For some monitoring, we need to include machine identity. Two example, I found is hostname or similar hostnames schema name.

Reviewed By: SAlexandru

Differential Revision: D13880705

fbshipit-source-id: e1d0238f4981adad1554d73f0ef6e5ef65a98c33
2019-02-04 11:08:32 -08:00
Alexander Kindyakov
344fbed429 Add flipType, isTypeEnter, isTypeExit for the systemcall event types (#5416)
Summary:
Pull Request resolved: https://github.com/facebook/osquery/pull/5416

To able to invert type from enter to exit and determine if type is exit or enter.

Part of a linux  tracing system, blueprint: [#5218](https://github.com/facebook/osquery/issues/5218)

Reviewed By: SAlexandru

Differential Revision: D13761673

fbshipit-source-id: 2bf668219fd996d9d5b67e0e1ccf5c1161a41481
2019-02-04 07:56:39 -08:00
Alexander Kindyakov
8871a1a493 Linux eBPF program to track setuid syscall (#5415)
Summary:
Pull Request resolved: https://github.com/facebook/osquery/pull/5415

Part of a linux  tracing system, blueprint: [#5218](https://github.com/facebook/osquery/issues/5218)

Reviewed By: SAlexandru

Differential Revision: D13669863

fbshipit-source-id: aadd14734cdc3586526be59f76f3176fa981a57f
2019-02-04 07:56:39 -08:00
Alexander Kindyakov
79cd575790 Make message realated methods of class Error shorter and less diverse (#5410)
Summary:
Pull Request resolved: https://github.com/facebook/osquery/pull/5410

 - get rid of *Short* methods
 - getFullMessage -> getNonRecursiveMessage
 - getFullMessageRecursive -> getMessage

Reviewed By: mkareta

Differential Revision: D13897854

fbshipit-source-id: 3e97ceefb2a48a16cd400f7ba7dd730724957ef0
2019-02-01 07:33:53 -08:00
Alexander Kindyakov
da91d8cfe8 to<std::string>() conversion template for c++ enums (#5408)
Summary:
Pull Request resolved: https://github.com/facebook/osquery/pull/5408

Move out c++ enums to std::string conversion function from
osquery/utils/error.h to separate module. To be able to use it somewhere else.

Reviewed By: guliashvili

Differential Revision: D13896772

fbshipit-source-id: 0a9f6327d5b2f115ce688446a67677879411eb1f
2019-02-01 07:33:53 -08:00
Alexander Kindyakov
32385bd9ca Hash function for enum classes (#5409)
Summary:
Pull Request resolved: https://github.com/facebook/osquery/pull/5409

This is just a ad-hoc fix up to handle libc++ and libstdc++ bug:
http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#2148
Eventually it will be removed.

Reviewed By: guliashvili

Differential Revision: D13896844

fbshipit-source-id: 38b3cd43b913e5e64d8d9ac40417e6ed0fcb6c41
2019-02-01 03:47:02 -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
Alexander Kindyakov
ee2756f95c eBPF tracking program for any syscall exit event (#5403)
Summary:
Pull Request resolved: https://github.com/facebook/osquery/pull/5403

Part of a linux  tracing system, blueprint: [#5218](https://github.com/facebook/osquery/issues/5218)

Reviewed By: SAlexandru

Differential Revision: D13690684

fbshipit-source-id: 039fc89929de49fcc7bd2287a98ffc68450fcada
2019-01-31 07:37:25 -08:00