platform/core/security/vist.git
4 years agoAdd boost::asio based RMI
Sangwan Kwon [Thu, 12 Dec 2019 10:11:15 +0000 (19:11 +0900)]
Add boost::asio based RMI

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoAdd transaction feature to database
Sangwan Kwon [Thu, 12 Dec 2019 02:57:48 +0000 (11:57 +0900)]
Add transaction feature to database

- performance (500 insert statements) -
DatabaseTests.no_transaction (2380 ms)
DatabaseTests.transaction (16 ms)

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoSupport policy activation to client
Sangwan Kwon [Tue, 10 Dec 2019 04:58:50 +0000 (13:58 +0900)]
Support policy activation to client

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoAdd activation property to policy-admin
Sangwan Kwon [Mon, 2 Dec 2019 08:53:23 +0000 (17:53 +0900)]
Add activation property to policy-admin

vist-policy has activated state when any of policy-admins are activated.

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoMake vist testable on docker
Sangwan Kwon [Mon, 2 Dec 2019 06:34:16 +0000 (15:34 +0900)]
Make vist testable on docker

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoChange database from klay to internal
Sangwan Kwon [Fri, 29 Nov 2019 06:47:04 +0000 (15:47 +0900)]
Change database from klay to internal

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoImport database code from klay
Sangwan Kwon [Fri, 29 Nov 2019 06:21:29 +0000 (15:21 +0900)]
Import database code from klay

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoChange filesystem from klay to boost
Sangwan Kwon [Fri, 29 Nov 2019 04:59:32 +0000 (13:59 +0900)]
Change filesystem from klay to boost

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoFix to use vist exception
Sangwan Kwon [Thu, 28 Nov 2019 07:55:08 +0000 (16:55 +0900)]
Fix to use vist exception

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoRemove rmi of klay
Sangwan Kwon [Thu, 28 Nov 2019 07:46:41 +0000 (16:46 +0900)]
Remove rmi of klay

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoChange rmi from klay to internal
Sangwan Kwon [Thu, 28 Nov 2019 07:32:54 +0000 (16:32 +0900)]
Change rmi from klay to internal

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoImport RMI code for internalize
Sangwan Kwon [Thu, 28 Nov 2019 06:20:13 +0000 (15:20 +0900)]
Import RMI code for internalize

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoAdd string type of policy to client API
Sangwan Kwon [Tue, 26 Nov 2019 08:22:24 +0000 (17:22 +0900)]
Add string type of policy to client API

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoAdd sample plugin
Sangwan Kwon [Tue, 26 Nov 2019 06:23:01 +0000 (15:23 +0900)]
Add sample plugin

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoEnable policy-provider to set compare method
Sangwan Kwon [Tue, 26 Nov 2019 05:06:35 +0000 (14:06 +0900)]
Enable policy-provider to set compare method

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoFix client API to support generic type
Sangwan Kwon [Mon, 25 Nov 2019 09:02:53 +0000 (18:02 +0900)]
Fix client API to support generic type

- example -
VirtualTable<Policy<int>> table;
for(const auto& row : table) {
  Policy<int> policy = { row[&Policy<int>::name], row[&Policy<int>::value] };
  INFO(VIST_CLIENT) << "Policy table:";
  INFO(VIST_CLIENT) << "\t name: " << policy.name;
  INFO(VIST_CLIENT) << "\t value: " << policy.value;
}

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoAdd glog backend as stderr mode
Sangwan Kwon [Fri, 22 Nov 2019 07:16:26 +0000 (16:16 +0900)]
Add glog backend as stderr mode

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoMake logger portable
Sangwan Kwon [Thu, 21 Nov 2019 09:23:55 +0000 (18:23 +0900)]
Make logger portable

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoFix policy-storage to save stringfied value
Sangwan Kwon [Wed, 20 Nov 2019 10:47:10 +0000 (19:47 +0900)]
Fix policy-storage to save stringfied value

If policy type is int, policy storage save the value as 'I/value'.
If policy type is string, policy storage save the value as 'S/value'.

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoFix policy-value to include stringfied value
Sangwan Kwon [Wed, 20 Nov 2019 09:44:21 +0000 (18:44 +0900)]
Fix policy-value to include stringfied value

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoAdd stringfy for type-conversion
Sangwan Kwon [Wed, 20 Nov 2019 06:27:18 +0000 (15:27 +0900)]
Add stringfy for type-conversion

Stringfy provides converion from type to string and vice versa

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoRevert "Support conversion between archive and string"
Sangwan Kwon [Wed, 20 Nov 2019 01:20:37 +0000 (10:20 +0900)]
Revert "Support conversion between archive and string"

This reverts commit dae502f799024c3b77afaea1c828f375f4301642.

4 years agoSupport conversion between archive and string
Sangwan Kwon [Mon, 18 Nov 2019 10:50:09 +0000 (19:50 +0900)]
Support conversion between archive and string

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoAdd archive type to policy-value as buffer
Sangwan Kwon [Mon, 18 Nov 2019 06:55:04 +0000 (15:55 +0900)]
Add archive type to policy-value as buffer

This is for supporting Generic Value Type.

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoAdd archive as serializer
Sangwan Kwon [Mon, 18 Nov 2019 04:32:48 +0000 (13:32 +0900)]
Add archive as serializer

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoDetach common library
Sangwan Kwon [Mon, 18 Nov 2019 03:26:42 +0000 (12:26 +0900)]
Detach common library

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoAdd default admin as vist-cli
Sangwan Kwon [Thu, 14 Nov 2019 07:07:57 +0000 (16:07 +0900)]
Add default admin as vist-cli

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
4 years agoApply enum based exception handling
Sangwan Kwon [Mon, 11 Nov 2019 06:05:33 +0000 (15:05 +0900)]
Apply enum based exception handling

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoReorganize directory structure
Sangwan Kwon [Fri, 8 Nov 2019 06:20:40 +0000 (15:20 +0900)]
Reorganize directory structure

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoAdd Result<Value, ErrCode> type for error handling
Sangwan Kwon [Fri, 8 Nov 2019 05:36:11 +0000 (14:36 +0900)]
Add Result<Value, ErrCode> type for error handling

Result<Valud, ErrCode> type contains either value or error_code.
This is inspired by rust's syntax(std::result::Result).
(ref: https://doc.rust-lang.org/std/result/enum.Result.html)

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoFix logger usage with bitwise operator
Sangwan Kwon [Thu, 7 Nov 2019 10:16:28 +0000 (19:16 +0900)]
Fix logger usage with bitwise operator

DEBUG, WARN logs are displayed when debug mode
- usage -
INFO(VIST) << "Info message" << 1;
DEBUG(VIST) << "Debug message" << 2 << 'a';
WARN(VIST) << "Warning message" << 3 << 'b' << true;
ERROR(VIST) << "Error message" << 4 << 'c' << false << 0.0f;

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoRename file extension from .h to .hpp
Sangwan Kwon [Thu, 7 Nov 2019 05:16:12 +0000 (14:16 +0900)]
Rename file extension from .h to .hpp

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoAdd enum based exception handling
Sangwan Kwon [Wed, 6 Nov 2019 05:36:43 +0000 (14:36 +0900)]
Add enum based exception handling

Standard c++ throw can not provide information like function, file,
line number. It makes hard to tracking where the exception occured.
So, add macro(THROW) which can track informations.

Syntax:
- THROW(ErrCode::LogicError) << "Additional information about exception";

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoRefine vist-policy database schema
Sangwan Kwon [Fri, 1 Nov 2019 07:20:07 +0000 (16:20 +0900)]
Refine vist-policy database schema

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoRedesign vist-policy except for multi-user concept
Sangwan Kwon [Thu, 31 Oct 2019 00:54:05 +0000 (09:54 +0900)]
Redesign vist-policy except for multi-user concept

Tizen originally intended to support multiuser platform.
As a result, the logic is complicated to support multi-users.
In practice, However, the multiuser concept is excluded on Tizen.
So we redesign except for the multi-user concept.

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoRename policyd to vist-policy
Sangwan Kwon [Wed, 30 Oct 2019 06:53:03 +0000 (15:53 +0900)]
Rename policyd to vist-policy

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoUpdate README.md
Sangwan Kwon [Tue, 29 Oct 2019 08:32:56 +0000 (17:32 +0900)]
Update README.md

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoAdd policy-admin table
Sangwan Kwon [Tue, 29 Oct 2019 06:00:15 +0000 (15:00 +0900)]
Add policy-admin table

Following queries are possible.
- SELECT * FROM policy_admin
- INSERT INTO policy_admin (name, uid) VALUES ('admin', 0)
- DELETE FROM policy_admin WHERE name = 'admin' AND uid = 0

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoAdd INSERT, DELETE features to osquery
Sangwan Kwon [Tue, 29 Oct 2019 05:53:56 +0000 (14:53 +0900)]
Add INSERT, DELETE features to osquery

- DELETE statement logic -
If the statement has a where clause, xFilter is called.
(otherwise, xUpdate is called directly.)
And xFilter calls VirtualTable::generate to find row matched with
the where clause.
When the row comes out, execute the delete statement through xUpdate.

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoDetach osquery dependency from client
Sangwan Kwon [Thu, 24 Oct 2019 05:55:21 +0000 (14:55 +0900)]
Detach osquery dependency from client

Make logger as common

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoAdd policy virtual table
Sangwan Kwon [Thu, 24 Oct 2019 02:42:37 +0000 (11:42 +0900)]
Add policy virtual table

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoRename Property API to VirtualTable
Sangwan Kwon [Thu, 24 Oct 2019 02:21:40 +0000 (11:21 +0900)]
Rename Property API to VirtualTable

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoMove APIs to vist-service
Sangwan Kwon [Wed, 23 Oct 2019 04:51:10 +0000 (13:51 +0900)]
Move APIs to vist-service

Osquery-manager is deprecated

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoApply server-client feature
Sangwan Kwon [Mon, 21 Oct 2019 08:57:38 +0000 (17:57 +0900)]
Apply server-client feature

- Add daemon named vistd
- Expose client api "Query::Execute()"

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoRename package to ViST
Sangwan Kwon [Mon, 21 Oct 2019 05:24:37 +0000 (14:24 +0900)]
Rename package to ViST

ViST(Virtual Security Table) is a security monitoring framework using SQL query

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoEnable wifi plugin
Sangwan Kwon [Fri, 18 Oct 2019 06:45:04 +0000 (15:45 +0900)]
Enable wifi plugin

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoMake database at run-time
Sangwan Kwon [Thu, 17 Oct 2019 05:01:03 +0000 (14:01 +0900)]
Make database at run-time

Now policy-provider is able to set the initial value at run-time

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoAdd server-client feature
Sangwan Kwon [Tue, 15 Oct 2019 08:13:40 +0000 (17:13 +0900)]
Add server-client feature

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoExpose policyd API
Sangwan Kwon [Mon, 14 Oct 2019 06:30:53 +0000 (15:30 +0900)]
Expose policyd API

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoDisable user, group table
Sangwan Kwon [Mon, 14 Oct 2019 04:41:43 +0000 (13:41 +0900)]
Disable user, group table

These tables are coflict with update-feature

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoExclude policy-test at docker-build
Sangwan Kwon [Mon, 14 Oct 2019 04:26:08 +0000 (13:26 +0900)]
Exclude policy-test at docker-build

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoSupport update feature with policyd
Sangwan Kwon [Fri, 11 Oct 2019 07:59:03 +0000 (16:59 +0900)]
Support update feature with policyd

Example: UPDATE policy SET value = '3' WHERE name = 'bluetooth'

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoEnable policyd to be called from osquery
Sangwan Kwon [Thu, 10 Oct 2019 06:25:57 +0000 (15:25 +0900)]
Enable policyd to be called from osquery

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoMinimize build dependencies
Sangwan Kwon [Tue, 8 Oct 2019 06:31:39 +0000 (15:31 +0900)]
Minimize build dependencies

Removed: rocksdb, lz4, zstd, snappy

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoEnable policy-manager to use policy-storage method
Sangwan Kwon [Wed, 2 Oct 2019 05:50:40 +0000 (14:50 +0900)]
Enable policy-manager to use policy-storage method

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoSupport to update policy-storage as strictest
Sangwan Kwon [Mon, 30 Sep 2019 04:16:44 +0000 (13:16 +0900)]
Support to update policy-storage as strictest

Strictest returns the strongest policy when there are multiple admins

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoEnable to enroll policy admin
Sangwan Kwon [Fri, 27 Sep 2019 07:54:58 +0000 (16:54 +0900)]
Enable to enroll policy admin

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoApply meyer's singleton to policy-manager
Sangwan Kwon [Wed, 25 Sep 2019 11:17:43 +0000 (20:17 +0900)]
Apply meyer's singleton to policy-manager

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoAdd policy-storage to policy-core
Sangwan Kwon [Wed, 25 Sep 2019 11:07:26 +0000 (20:07 +0900)]
Add policy-storage to policy-core

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoAdd policy-loader to policyd
Sangwan Kwon [Tue, 24 Sep 2019 06:39:56 +0000 (15:39 +0900)]
Add policy-loader to policyd

Disable whole features without policy-core and sdk.
* Restore the features before PR to master branch.

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoAdd policyd-sdk as header only library
Sangwan Kwon [Mon, 23 Sep 2019 01:09:43 +0000 (10:09 +0900)]
Add policyd-sdk as header only library

Policyd-sdk includes the minimum headers that policyd-sever and
policyd-provider look at in common.
Policy provider just needs policyd-sdk to make the plugin.

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoChange policyd-testbench to gtest
Sangwan Kwon [Tue, 17 Sep 2019 09:53:46 +0000 (18:53 +0900)]
Change policyd-testbench to gtest

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoApply template-method-pattern to policy-model
Sangwan Kwon [Tue, 17 Sep 2019 06:03:23 +0000 (15:03 +0900)]
Apply template-method-pattern to policy-model

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoImport device-policy-manager from tizen
Sangwan Kwon [Tue, 17 Sep 2019 05:41:20 +0000 (14:41 +0900)]
Import device-policy-manager from tizen

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoMake gbs-build stable
Sangwan Kwon [Mon, 16 Sep 2019 06:03:58 +0000 (15:03 +0900)]
Make gbs-build stable

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoMake apix-test stable
Sangwan Kwon [Mon, 16 Sep 2019 05:30:31 +0000 (14:30 +0900)]
Make apix-test stable

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoBump codegen to upstream-4.0.0
Sangwan Kwon [Mon, 16 Sep 2019 02:40:48 +0000 (11:40 +0900)]
Bump codegen to upstream-4.0.0

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoRemove numeric_monitoring feature
Sangwan Kwon [Mon, 16 Sep 2019 02:03:40 +0000 (11:03 +0900)]
Remove numeric_monitoring feature

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoRemove killswitch feature
Sangwan Kwon [Mon, 16 Sep 2019 01:45:30 +0000 (10:45 +0900)]
Remove killswitch feature

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoRemove extension, watcher features
Sangwan Kwon [Tue, 10 Sep 2019 08:42:28 +0000 (17:42 +0900)]
Remove extension, watcher features

- Disconnect thrift dependency

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoBump osquery to upstream-4.0.0 [experimental]
Sangwan Kwon [Tue, 10 Sep 2019 04:57:15 +0000 (13:57 +0900)]
Bump osquery to upstream-4.0.0 [experimental]

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoImport utils from upstream-4.0.0
Sangwan Kwon [Mon, 9 Sep 2019 06:01:40 +0000 (15:01 +0900)]
Import utils from upstream-4.0.0

- Add MIT-LICENSE for rapidjson (v1.1.0)
- Update stl from c++11 to c++14

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoMinimize table specs
Sangwan Kwon [Mon, 9 Sep 2019 04:45:40 +0000 (13:45 +0900)]
Minimize table specs

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoReorganize directory structure
Sangwan Kwon [Thu, 5 Sep 2019 08:13:13 +0000 (17:13 +0900)]
Reorganize directory structure

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoAdd command feature
Sangwan Kwon [Tue, 20 Aug 2019 05:27:21 +0000 (14:27 +0900)]
Add command feature

- Origin osquery only supports query feature (SELECT)
+ Tizen osquery adds command feature (UPDATE)

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoAdd dpm plugin implementations
Sangwan Kwon [Wed, 4 Sep 2019 06:32:58 +0000 (15:32 +0900)]
Add dpm plugin implementations

- bluetooth, usb, wifi

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoBump version to upstream-1.5.0 [stable]
Sangwan Kwon [Thu, 25 Jun 2015 08:35:51 +0000 (01:35 -0700)]
Bump version to upstream-1.5.0 [stable]

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoDraft bluetooth and usb policy
Sangwan Kwon [Thu, 1 Aug 2019 02:09:38 +0000 (11:09 +0900)]
Draft bluetooth and usb policy

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoRe-design wifi-policy
Sangwan Kwon [Sun, 28 Jul 2019 23:15:53 +0000 (08:15 +0900)]
Re-design wifi-policy

- Verification can be done with full-DPM

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoDisable circle-ci temporarily
Sangwan Kwon [Sun, 28 Jul 2019 23:22:13 +0000 (08:22 +0900)]
Disable circle-ci temporarily

- Circle-ci doesn't support libssl1.0-dev now

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoAdd testcases about wifi-policy
Sangwan Kwon [Wed, 24 Jul 2019 03:14:16 +0000 (12:14 +0900)]
Add testcases about wifi-policy

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoCleanup CMakeLists
Sangwan Kwon [Mon, 22 Jul 2019 03:00:23 +0000 (12:00 +0900)]
Cleanup CMakeLists

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoImport dpm-wifi plugin from tizen
Sangwan Kwon [Mon, 22 Jul 2019 02:38:12 +0000 (11:38 +0900)]
Import dpm-wifi plugin from tizen

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoSupport ONLY_GBS mode
Sangwan Kwon [Sun, 21 Jul 2019 22:00:26 +0000 (07:00 +0900)]
Support ONLY_GBS mode

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoReorganize directory structure
Sangwan Kwon [Wed, 17 Jul 2019 00:41:14 +0000 (09:41 +0900)]
Reorganize directory structure

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoBump version to upstream-1.4.7
Sangwan Kwon [Tue, 5 May 2015 23:14:24 +0000 (16:14 -0700)]
Bump version to upstream-1.4.7

- Harden extensions/dispatcher tests
- Move specs to a top-level path
- Add syslog plugin

Added: msr(model specific register)
Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoAdd more properties
Sangwan Kwon [Thu, 11 Jul 2019 22:04:52 +0000 (07:04 +0900)]
Add more properties

Added: User, Group, MemoryMap

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoResolve SEGFAULT
Sangwan Kwon [Wed, 10 Jul 2019 20:09:45 +0000 (05:09 +0900)]
Resolve SEGFAULT

TODO: Registry locking mechanism should be checked on upstream

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoMerge upstream-1.4.5 [experimental]
Sangwan Kwon [Wed, 10 Jul 2019 03:31:01 +0000 (12:31 +0900)]
Merge upstream-1.4.5 [experimental]

Known issues
  - extension tests failed
  - virtual table tests failed (passed only when it runs as standalone)

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoAdd Properties API for getting multi-property
Sangwan Kwon [Wed, 3 Jul 2019 21:52:23 +0000 (06:52 +0900)]
Add Properties API for getting multi-property

-- API usage --
Properties<Processes> processes;
for (auto& p : processes) {
std::cout << p[&Processes::pid] << std::endl;
std::cout << p[&Processes::name] << std::endl;
std::cout << p[&Processes::path] << std::endl;
std::cout << p[&Processes::cmdline] << std::endl;
std::cout << p[&Processes::uid] << std::endl;
std::cout << p[&Processes::gid] << std::endl;
std::cout << p[&Processes::euid] << std::endl;
std::cout << p[&Processes::egid] << std::endl;
}

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoAdd Property API for type-safe getter
Sangwan Kwon [Tue, 2 Jul 2019 23:50:21 +0000 (08:50 +0900)]
Add Property API for type-safe getter

-- Time table schema --
struct time {
  int hour;
  int minutes;
  int seconds;
};

-- API usage --
Property<Time> time;
Time result = {
  time[&Time::hour];
  time[&Time::minutes];
  time[&Time::seconds];
};

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoAdd getTableName to tsqb
Sangwan Kwon [Mon, 1 Jul 2019 22:26:56 +0000 (07:26 +0900)]
Add getTableName to tsqb

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoMake variadic template class's destructor as virtual
Sangwan Kwon [Sun, 30 Jun 2019 23:21:30 +0000 (08:21 +0900)]
Make variadic template class's destructor as virtual

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoApply CRTP idiom to database
Sangwan Kwon [Sun, 30 Jun 2019 22:24:21 +0000 (07:24 +0900)]
Apply CRTP idiom to database

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoApply CRTP idiom to table
Sangwan Kwon [Thu, 27 Jun 2019 00:04:40 +0000 (09:04 +0900)]
Apply CRTP idiom to table

This patch is for single responsibility principle.

The curiously recurring template pattern (CRTP) is an idiom in C++
in which a class X derives from a class template instantiation
using X itself as template argument

ref: https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoImport type-safe query builder
Sangwan Kwon [Wed, 26 Jun 2019 04:04:15 +0000 (13:04 +0900)]
Import type-safe query builder

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoFix typo on license boilerplate
Sangwan Kwon [Mon, 24 Jun 2019 23:40:30 +0000 (08:40 +0900)]
Fix typo on license boilerplate

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoInvert the dependency between manager and notification
Sangwan Kwon [Mon, 24 Jun 2019 23:23:35 +0000 (08:23 +0900)]
Invert the dependency between manager and notification

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoDivide programming-interface into api and impl
Sangwan Kwon [Mon, 24 Jun 2019 23:21:12 +0000 (08:21 +0900)]
Divide programming-interface into api and impl

API header: ${project}/api/osquery_manager.h

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>
5 years agoAdd programming interface for event subscription
Sangwan Kwon [Wed, 19 Jun 2019 02:54:45 +0000 (11:54 +0900)]
Add programming interface for event subscription

Signed-off-by: Sangwan Kwon <sangwan.kwon@samsung.com>