2017-07-25 03:47:32 +02:00
diff --git a/CMakeLists.txt b/CMakeLists.txt
2018-07-18 22:23:20 +02:00
index 0242fb71..5007aace 100644
2017-07-25 03:47:32 +02:00
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
2018-07-18 22:23:20 +02:00
@@ -304,7 +304,6 @@ else()
# To be safe, only include them when building 'release' outputs.
add_compile_options(
-g
- -fno-limit-debug-info
-fPIE
-fpie
-fPIC
@@ -449,12 +448,6 @@ elseif(CLANG AND DEPS AND NOT FREEBSD)
2018-04-24 07:13:49 +02:00
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -flto=thin")
2017-07-13 06:18:52 +02:00
endif()
-if(NOT IS_DIRECTORY "${CMAKE_SOURCE_DIR}/third-party/sqlite3")
- WARNING_LOG("Cannot find git submodule third-party/sqlite3 directory")
- WARNING_LOG("Please run: make deps or git submodule update --init")
- message(FATAL_ERROR "No sqlite3 directory")
-endif()
-
# Make sure deps were built before compiling (else show warning).
execute_process(
COMMAND "${CMAKE_SOURCE_DIR}/tools/provision.sh" check "${CMAKE_BINARY_DIR}"
2018-07-18 22:23:20 +02:00
@@ -521,6 +514,8 @@ endif()
2017-07-25 03:47:32 +02:00
if(APPLE)
LOG_PLATFORM("OS X")
+elseif(OSQUERY_BUILD_PLATFORM STREQUAL "nixos")
+ LOG_PLATFORM("NixOS")
elseif(OSQUERY_BUILD_PLATFORM STREQUAL "debian")
LOG_PLATFORM("Debian")
elseif(OSQUERY_BUILD_PLATFORM STREQUAL "ubuntu")
2018-07-18 22:23:20 +02:00
@@ -570,7 +565,6 @@ if(POSIX AND DEPS)
2018-04-24 07:13:49 +02:00
endif()
2017-07-13 06:18:52 +02:00
endif()
-include_directories("${CMAKE_SOURCE_DIR}/third-party/sqlite3")
include_directories("${CMAKE_SOURCE_DIR}/include")
include_directories("${CMAKE_SOURCE_DIR}")
2018-07-18 22:23:20 +02:00
@@ -661,18 +655,6 @@ if(FREEBSD OR "${HAVE_TR1_TUPLE}" STREQUAL "")
2018-04-24 07:13:49 +02:00
add_definitions(-DGTEST_USE_OWN_TR1_TUPLE=0)
2017-07-13 06:18:52 +02:00
endif()
-set(GTEST_FLAGS
- "-I${CMAKE_SOURCE_DIR}/third-party/googletest/googletest/include"
- "-I${CMAKE_SOURCE_DIR}/third-party/googletest/googlemock/include"
-)
-join("${GTEST_FLAGS}" " " GTEST_FLAGS)
-
2018-04-24 07:13:49 +02:00
-if(NOT SKIP_TESTS)
- add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/googletest")
-endif()
2017-07-13 06:18:52 +02:00
-
-add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/sqlite3")
-
2018-04-24 07:13:49 +02:00
if(NOT FREEBSD)
add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/linenoise-ng")
endif()
2017-07-25 03:47:32 +02:00
diff --git a/osquery/CMakeLists.txt b/osquery/CMakeLists.txt
2018-07-18 22:23:20 +02:00
index e3842962..f405503d 100644
2017-07-25 03:47:32 +02:00
--- a/osquery/CMakeLists.txt
+++ b/osquery/CMakeLists.txt
2018-07-18 22:23:20 +02:00
@@ -33,8 +33,6 @@ if(CLANG AND POSIX)
2018-04-24 07:13:49 +02:00
-Wextra
-pedantic
-Wuseless-cast
- -Wno-c99-extensions
- -Wno-zero-length-array
-Wno-unused-parameter
-Wno-gnu-case-range
-Weffc++
2018-07-18 22:23:20 +02:00
@@ -63,14 +61,7 @@ endif()
2017-07-13 06:18:52 +02:00
# Construct a set of all object files, starting with third-party and all
# of the osquery core objects (sources from ADD_CORE_LIBRARY macros).
2018-04-24 07:13:49 +02:00
-if(FREEBSD)
- set(OSQUERY_OBJECTS $<TARGET_OBJECTS:osquery_sqlite>)
-else()
- set(OSQUERY_OBJECTS
- $<TARGET_OBJECTS:osquery_sqlite>
- $<TARGET_OBJECTS:linenoise-ng>
- )
-endif()
+set(OSQUERY_OBJECTS $<TARGET_OBJECTS:linenoise-ng>)
2017-07-13 06:18:52 +02:00
# Add subdirectories
add_subdirectory(config)
2018-07-18 22:23:20 +02:00
@@ -151,10 +142,11 @@ if(APPLE OR LINUX)
2018-04-24 07:13:49 +02:00
ADD_OSQUERY_LINK_ADDITIONAL("rocksdb_lite")
elseif(FREEBSD)
ADD_OSQUERY_LINK_CORE("icuuc")
- ADD_OSQUERY_LINK_CORE("linenoise")
2017-07-13 06:18:52 +02:00
ADD_OSQUERY_LINK_ADDITIONAL("rocksdb-lite")
endif()
+ADD_OSQUERY_LINK_CORE("sqlite3")
+
if(POSIX)
ADD_OSQUERY_LINK_CORE("boost_system")
ADD_OSQUERY_LINK_CORE("boost_filesystem")
2018-07-18 22:23:20 +02:00
@@ -172,10 +164,10 @@ endif()
2017-07-25 03:47:32 +02:00
ADD_OSQUERY_LINK_CORE("glog${WO_KEY}")
if(POSIX)
2018-06-18 16:50:31 +02:00
- # Hashing methods in core use libcrypto.
- ADD_OSQUERY_LINK_CORE("crypto")
-
2017-07-25 03:47:32 +02:00
+ ADD_OSQUERY_LINK_ADDITIONAL("benchmark")
2018-04-24 07:13:49 +02:00
+ ADD_OSQUERY_LINK_ADDITIONAL("snappy")
2017-07-25 03:47:32 +02:00
ADD_OSQUERY_LINK_ADDITIONAL("ssl")
2018-06-18 16:50:31 +02:00
+ ADD_OSQUERY_LINK_ADDITIONAL("crypto")
2018-04-24 07:13:49 +02:00
ADD_OSQUERY_LINK_ADDITIONAL("libpthread")
2018-06-18 16:50:31 +02:00
ADD_OSQUERY_LINK_ADDITIONAL("magic")
endif()
2018-04-24 07:13:49 +02:00
diff --git a/osquery/extensions/CMakeLists.txt b/osquery/extensions/CMakeLists.txt
index 52f3bf80..066ed1c0 100644
--- a/osquery/extensions/CMakeLists.txt
+++ b/osquery/extensions/CMakeLists.txt
@@ -60,12 +60,6 @@ else()
)
2017-07-25 03:47:32 +02:00
endif()
2018-04-24 07:13:49 +02:00
-if(NOT WINDOWS)
- add_compile_options(
- -Wno-macro-redefined
- )
-endif()
-
ADD_OSQUERY_LIBRARY(TRUE osquery_extensions
${THRIFT_GENERATED_FILES}
${THRIFT_IMPL_FILE}
diff --git a/osquery/logger/CMakeLists.txt b/osquery/logger/CMakeLists.txt
index ab91bd24..d8364991 100644
--- a/osquery/logger/CMakeLists.txt
+++ b/osquery/logger/CMakeLists.txt
@@ -55,9 +55,9 @@ if(NOT SKIP_KAFKA AND NOT WINDOWS AND NOT FREEBSD)
ADD_OSQUERY_LINK_ADDITIONAL("rdkafka")
- set(OSQUERY_LOGGER_KAFKA_PLUGINS_TESTS
- "logger/plugins/tests/kafka_producer_tests.cpp"
- )
+ #set(OSQUERY_LOGGER_KAFKA_PLUGINS_TESTS
+ # "logger/plugins/tests/kafka_producer_tests.cpp"
+ #)
ADD_OSQUERY_TEST_ADDITIONAL(${OSQUERY_LOGGER_KAFKA_PLUGINS_TESTS})
endif()
diff --git a/osquery/tables/CMakeLists.txt b/osquery/tables/CMakeLists.txt
2018-07-18 22:23:20 +02:00
index 3ecbb711..af7220d3 100644
2018-04-24 07:13:49 +02:00
--- a/osquery/tables/CMakeLists.txt
+++ b/osquery/tables/CMakeLists.txt
@@ -68,7 +68,7 @@ if(LINUX)
set(TABLE_PLATFORM "linux")
ADD_OSQUERY_LINK_ADDITIONAL("libresolv.so")
- ADD_OSQUERY_LINK_ADDITIONAL("cryptsetup devmapper lvm2app lvm-internal daemonclient")
+ ADD_OSQUERY_LINK_ADDITIONAL("cryptsetup devmapper lvm2app")
ADD_OSQUERY_LINK_ADDITIONAL("gcrypt gpg-error")
ADD_OSQUERY_LINK_ADDITIONAL("blkid")
ADD_OSQUERY_LINK_ADDITIONAL("ip4tc")
2017-07-25 03:47:32 +02:00
diff --git a/specs/windows/services.table b/specs/windows/services.table
index 4ac24ee9..657d8b99 100644
--- a/specs/windows/services.table
+++ b/specs/windows/services.table
@@ -12,7 +12,7 @@ schema([
Column("path", TEXT, "Path to Service Executable"),
Column("module_path", TEXT, "Path to ServiceDll"),
Column("description", TEXT, "Service Description"),
- Column("user_account", TEXT, "The name of the account that the service process will be logged on as when it runs. This name can be of the form Domain\UserName. If the account belongs to the built-in domain, the name can be of the form .\UserName."),
+ Column("user_account", TEXT, "The name of the account that the service process will be logged on as when it runs. This name can be of the form Domain\\UserName. If the account belongs to the built-in domain, the name can be of the form .\\UserName."),
])
implementation("system/windows/services@genServices")
examples([