Commit Graph

37 Commits

Author SHA1 Message Date
Stefano Bonicatti
52f310a5a8
First steps to remove the Buck build system (#6361)
* First steps to remove the Buck build system

* Azure Pipelines: Rename jobs for consistency
2020-04-09 01:56:21 +02:00
kumarak
9346926030 Restore extension SDK support to osquery 4.x (#5851)
CMake utility functions(generateOsqueryExtensionGroup,addOsqueryExtensioni{Ex},
addOsqueryModule) to add extensions.

Updates the boost library submodules needed for extensions build.

Use cache variable(OSQUERY_EXTENSION_GROUP_NAME) for the grouping of extensions
and fix the linkage with osquery interface library.
2019-10-18 18:45:20 -04:00
Alessandro Gario
6481b34e23
Refactor third-party libraries to build from source on Linux (#5706)
Add a way to compile third-party libraries from source instead of downloading prebuilt ones.
Each library source code is downloaded with git into a submodule at configure time,
in response to the find_package(library_name) CMake call,
except for OpenSSL where the official source archive is used.
Each submodule is attached to a release tag on its own upstream repository.
All the libraries are built using CMake directly, except for OpenSSL which uses a formula system,
which permits to build libraries with a separate build system
when there's no easy way to integrate it directly with CMake.

This new dependency system determines which library is fetched from where using the concept of "layers".
Currently we have three of them: source, formula, facebook,
where the last layer represents the pre-built libraries.
The provided order will be used when looking for libraries.

A system to patch submodule source code has been added and it's currently used with googletest, libudev and util-linux.
Patches should be put under libraries/cmake/source/<library name>/patches/<submodule>,
where <submodule> is often one and is "src", but in other cases, like AWS,
there are multiple with a more specific name.
If for whatever reason the submodule cloning or the patching fails,
the submodule has to be unregistered and its folder should be cleared.
This should be achievable with "git submodule deinit -f <submodule path>"

Following some other changes on existing functionality:

- Changed the CMake variable BUILD_TESTING to OSQUERY_BUILD_TESTS
  to avoid enabling tests on third party libraries.
  Due to an issue with glog the BUILD_TESTING variable
  will be always forced to OFF.
- Moved compiler and linker flags to their own file cmake/flags.cmake
- Moved all the third-party CMakeLists.txt used for pre-built libraries under libraries/cmake/facebook
- Added the --exclude-folders option to tools/format-check.py and tools/git-clang-format.py,
  so that it's possible to ignore any third party library source code.
- The format and format_check target use the new --exclude-folders option
  to exclude libraries/cmake/source from formatting.
- The test and osquery binaries are properly compiled with PIE (osquery/osquery#5611)

Co-authored-by: Stefano Bonicatti <stefano.bonicatti@gmail.com>
Co-authored-by: Teddy Reed <teddy@casualhacking.io>
2019-08-30 16:25:19 +02:00
Teddy Reed
c2451f3383
release: prepping for osquery 3.4.0 release on Windows
Please see #5590
2019-06-21 17:25:34 -04: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
971bee4441 Move build system to BUCK
fbshipit-source-id: 8ffef5e6a393ac67ce56dcb74845402e43d964a0
2018-12-07 16:12:35 +00:00
M Amin
bdd2c47551 build: Update provisioning and build scripts to VS2017 (as per #4151) (#4496) 2018-06-08 21:05:40 -07:00
Filipe Manco
5589d109c8
Add support for generating ctags and cscope (#4230) 2018-04-05 11:34:52 +01:00
Alessandro Gario
9c0bd4abfb audit-based file integrity monitoring (#3492) 2018-01-15 19:57:50 -08:00
Nick Anderson
6a90db47be Adding the Windows Scheduled Tasks virtual table (#3153) 2017-04-13 07:53:49 -07:00
Teddy Reed
111dadf8a0 Upgrade LLVM to 3.8.1 on Linux (#2436) 2016-09-02 07:59:10 -07:00
Teddy Reed
02dd921d3b Introduce 'external' project builds: make externals (#2385) 2016-08-17 13:33:28 -07:00
Teddy Reed
86363bc60a Add AWS-SDK-CPP r1 hashes (#2370) 2016-08-15 17:56:48 -07:00
Teddy Reed
b9a5313123 Update third-party for Win10 building and add .patch to gitignore (#2250) 2016-07-15 10:55:28 -07:00
Sharvil Shah
f72dcb5d96 add libcrypysetup-dev library
moved disk_ecryption table spec to crossplatform

link libcryptsetup

implemented get cipher type and cipher_mode:

more idiomatic c++11

no need to explicitly call std::string constructor to convert char * to std::string

update cryptsetup sources for centos

add function prototype for older libcryptsetup which is in centos6

ifdef check for centos6 which uses older libcryptsetup

remove forward declared functions defined in libcryptsetup, stylistic changes
2015-04-24 17:01:14 -07:00
Wesley Shields
a9644d22c2 Implement YARA table.
Currently only for OS X, will port to others soon.

Also need to add tests.

Remove old comment and add loading message.

Implement YARA table for Linux.

Use mask properly.

Use the various masks to specify the kinds of events we are interested
in. This removes the need to do the dirty "DELETED" check when the event
fires.

Make getYARAFiles return a const map.

Switch to LOG(WARNING) and emit error number.

Add vim .swp files to .gitignore.

Add yara_utils.(c|h).

Start to condense common code between the Linux and Darwin YARA tables
into a yara_utils.h. Right now it includes a function to compile rules
and store the results back in the map, indexed by category. It also has
the callback used by YARA when a rule is processed. I can not move much
more than that for the row creation code because the structures used in
the event callback are slightly different.

Include a better error message.

The errors are still printed by the compiler callback, but this will
allow my future work to return a Status from the event initialization to
print a useful message in summary.

Make Subscriber init() return Status.

Each EventSubscriber::init() now returns a Status. If the init() fails
for any reason the EventSubscriber is still stored but the failure is
tracked.

EventSubscribers now have a state member, which represents the current
state of the subscriber. The current supported states are:
uninitialized, running, paused, failed. Currently the only meaningful
ones are running and failed, but I put paused in there as a
forward-looking feature.

Subscriptions now have a subscriber_name member. This is used in
EventPublisherPlugin::fire() as a lookup to get the EventSubscriber and
check the state. If the EventSubscriber is not running the event will
not fire.

Only the EventSubscribers on OS X are using this. I'll do the Linux
implementation next.

Chase the init() changes to Linux.

This brings the Linux YARA table in line with the OS X one.

Require a EventSubscriberID when creating a subscription.

Now that Subscriptions are "tied" to EventSubscribers you must create a
Subscription with the name of the Subscriber it is for. This is because
when the event fires the list of Subscriptions is walked and the name is
used to lookup the EventSubscriber and make sure it is in the running
state.

Fix various tests.

Some tests would fire an event with only a Subscription, which is no
longer a valid thing to do. For these tests an EventSubscription is
created and registered in the EventFactory.

When Subscriptions are created pass the name of the EventSubscriber to
them. In some cases where no event is ever fired it is fine to pass a
bogus name.

Fix inotify tests.

Move a test down so the class is defined and make sure to create an
EventSubscriber and use it properly.

Add support for yara to provision.sh.

Right now this grabs yara 3.3.0 and applies the patch to fix min() and max(),
which is commit fc4696c8b725be1ac099d340359c8d550d116041 in the yara repo.

This has been tested under Ubuntu 14.04 only.

Remove NOMINMAX.

This is no longer necessary after the patch was backported to 3.3.0.

Revert "Add support for yara to provision.sh."

This reverts commit a8bd371498c0979f070adeff23d05571882ac3f1.

Use vendored YARA code in third-party.

This switches to using the YARA code contained in third-party, including
the patch to fix min/max macros.

Fix mismerge.

Remove unused function after merge.

Well, soon to be unused as soon as I fix up the Linux YARA table. ;)

Chase config changes.

Make the Linux YARA table use ConfigDataInstance along with files() and
yaraFiles().
2015-04-03 00:47:39 -07:00
Teddy Reed
0673900837 Registry modules 2015-03-04 20:33:10 -08:00
Teddy Reed
f3ab333cf1 Add -s flag to OSX package script 2014-12-04 09:33:04 -08:00
Teddy Reed
62d6472cfe Rethinking some build improvements 2014-11-08 19:28:35 -08:00
Teddy Reed
b79f512a9a [site] Add tables API page 2014-11-05 02:19:20 -08:00
Zachary Wasserman
9fb10a00b5 Add common Emacs/Vim tempfile entries to .gitignore 2014-11-03 11:20:52 -08:00
Teddy Reed
0a1925200e Clean flags usage in daemon/shell and dbhandle 2014-10-27 12:09:35 -07:00
Abe Stanway
5b3152230f Remove old generated table dir from gitignore 2014-09-27 19:15:27 +00:00
mike@arpaia.co
4cd40c7f19 central build script 2014-09-25 02:00:16 -07:00
mike@arpaia.co
e69007d81a Revert "in source builds"
This reverts commit 28dd7a68f9.
2014-09-23 20:23:03 -07:00
mike@arpaia.co
28dd7a68f9 in source builds 2014-09-23 20:22:07 -07:00
mike@arpaia.co
1f6ebd4cf7 fixing bug in dependency building 2014-09-20 16:26:40 -07:00
mike@arpaia.co
04f7a34dc1 Dependency building in repo 2014-09-20 16:19:51 -07:00
mike@arpaia.co
b716788d53 update include paths 2014-09-15 23:52:31 -07:00
mike@arpaia.co
5d6e07d8c7 improved doxygen directory structure 2014-09-15 18:51:37 -07:00
mike@arpaia.co
951d6effaa gitignoring idea dictionaries 2014-09-09 00:48:56 -07:00
mike@arpaia.co
1cffaca741 Support for CLion C/C++ IDE 2014-09-09 00:10:20 -07:00
mike@arpaia.co
9451cef6e5 Deploy infrastructure for OS X 2014-08-20 00:47:14 -07:00
Teddy Reed
1b6ef08611 Silencing various compiler errors for goto statements. 2014-08-13 08:56:39 -07:00
mike@arpaia.co
9dfb020e02 don't include generated virtual tables in git 2014-08-05 02:51:23 -07:00
mike@arpaia.co
b6fefde437 updating the gitignore to ignore vagrant artifacts 2014-08-01 10:45:34 -07:00
mike@arpaia.co
73a32b7294 Initial commit 2014-07-30 17:35:19 -07:00