platform/core/security/nice-lad.git
7 years agoAdapt to security-manager API changes 51/138151/2 accepted/tizen_3.0_common accepted/tizen_3.0_ivi accepted/tizen_3.0_mobile accepted/tizen_3.0_tv accepted/tizen_3.0_wearable accepted/tizen_4.0_unified accepted/tizen_5.0_unified accepted/tizen_5.5_unified accepted/tizen_5.5_unified_mobile_hotfix accepted/tizen_5.5_unified_wearable_hotfix accepted/tizen_6.0_unified accepted/tizen_6.0_unified_hotfix tizen_3.0 tizen_3.0.m2 tizen_5.0 tizen_5.5 tizen_5.5_mobile_hotfix tizen_5.5_tv tizen_5.5_wearable_hotfix tizen_6.0 tizen_6.0_hotfix accepted/tizen/3.0/common/20170714.175006 accepted/tizen/3.0/ivi/20170714.074200 accepted/tizen/3.0/mobile/20170714.074109 accepted/tizen/3.0/tv/20170714.074123 accepted/tizen/3.0/wearable/20170714.074134 accepted/tizen/4.0/unified/20170816.012849 accepted/tizen/4.0/unified/20170816.015555 accepted/tizen/4.0/unified/20170829.015913 accepted/tizen/5.0/unified/20181102.021753 accepted/tizen/5.5/unified/20191031.023230 accepted/tizen/5.5/unified/mobile/hotfix/20201027.090828 accepted/tizen/5.5/unified/wearable/hotfix/20201027.113439 accepted/tizen/6.0/unified/20201030.115218 accepted/tizen/6.0/unified/hotfix/20201103.002958 accepted/tizen/unified/20170713.153302 submit/tizen/20170712.102507 submit/tizen_3.0/20170712.095854 submit/tizen_3.0/20170714.011431 submit/tizen_4.0/20170811.094300 submit/tizen_4.0/20170814.115522 submit/tizen_4.0/20170828.100004 submit/tizen_4.0/20170828.110004 submit/tizen_4.0_unified/20170814.115522 submit/tizen_5.0/20181101.000004 submit/tizen_5.5/20191031.000004 submit/tizen_5.5_mobile_hotfix/20201026.185104 submit/tizen_5.5_wearable_hotfix/20201026.184304 submit/tizen_6.0/20201029.205104 submit/tizen_6.0_hotfix/20201102.192504 submit/tizen_6.0_hotfix/20201103.114804 tizen_4.0.IoT.p1_release tizen_4.0.IoT.p2_release tizen_4.0.m2_release tizen_5.5.m2_release tizen_6.0.m2_release
Krzysztof Jackiewicz [Tue, 11 Jul 2017 07:30:10 +0000 (09:30 +0200)]
Adapt to security-manager API changes

Group names were replaced by gids. security_manager_groups_free() has been
replaced by free(). Audit allows both gid and group name as "obj_gid" value
(actually it translates the group name to gid_t anyway).

Tests updated.

Change-Id: Ibcd8d70d1741fe7c2191e95bda8d4c6d68d8b5e2

8 years agoAdd Lad::Options::collectorLogLevel 64/44064/48 accepted/tizen_common accepted/tizen/3.0/common/20161114.110018 accepted/tizen/common/20161014.103138 accepted/tizen/unified/20170313.190432 submit/tizen/20161014.065203 submit/tizen_3.0_common/20161104.104000 submit/tizen_unified/20170313.195099 tizen_4.0.m1_release
Oskar Świtalski [Thu, 16 Jul 2015 11:01:00 +0000 (13:01 +0200)]
Add Lad::Options::collectorLogLevel

Adds possibility to change log level of logs sent to collectors.
Test: Run nice-lad-tests

Change-Id: I95b5f238fac3bd935ae96417f4c8ea3d71825649
Signed-off-by: Oskar Świtalski <o.switalski@samsung.com>
9 years agoAdd manpages and INSTALL.md guide file 93/45393/21
Oskar Świtalski [Tue, 4 Aug 2015 12:02:11 +0000 (14:02 +0200)]
Add manpages and INSTALL.md guide file

Manual pages for nice-lad and nice_lad.conf added in section 8.

Change-Id: Ie8a0f2503de6541a970bf483cc54a0c4c05ee8ae

9 years agoAdd debug compilation mode 79/44479/9 master
Oskar Świtalski [Wed, 22 Jul 2015 11:10:53 +0000 (13:10 +0200)]
Add debug compilation mode

To build in chosen mode -DCMAKE_BUILD_TYPE=<mode> should be added
to CMake command. Available modes are: RELEASE, DEBUG, CCOV,
PROFILING.

Change-Id: I7cf54f43014a18e1871575b86495dfbc7ae01102

9 years agoFix critical bug in exceptions handling 39/45539/6
Oskar Świtalski [Fri, 7 Aug 2015 08:06:35 +0000 (10:06 +0200)]
Fix critical bug in exceptions handling

Exception classes must publicly inherit from std::exception,
to be catched by std::exception catch.

Change-Id: I406cce76c652f112f4acff79264c0a49496b767e

9 years agoFix installation of config file 73/45573/3
Oskar Świtalski [Fri, 7 Aug 2015 11:12:01 +0000 (13:12 +0200)]
Fix installation of config file

Change-Id: I742ad5c5ee9a25bd09d5fa5b8ffd7ecd6787f470

9 years agoAdd README 06/43806/3
Aleksander Zdyb [Tue, 14 Jul 2015 07:49:07 +0000 (09:49 +0200)]
Add README

Change-Id: I5f31bc20791aa0bf370c8a77b8aa42ad0d0f8b5c

9 years agoAdd packaging for Tizen 3.0 47/43747/1
Aleksander Zdyb [Tue, 30 Jun 2015 05:56:03 +0000 (07:56 +0200)]
Add packaging for Tizen 3.0

Change-Id: I67050c6dbd8cc993924f24efdfcf0094828c50d4

9 years agoAdd main and CMakeLists 46/43746/1
Aleksander Zdyb [Mon, 29 Jun 2015 15:14:43 +0000 (17:14 +0200)]
Add main and CMakeLists

Change-Id: Iaed10d52e29cc63b9e5d77c6aacc215fdc5d66ce

9 years agoAdd configuration 45/43745/1
Aleksander Zdyb [Mon, 29 Jun 2015 18:47:27 +0000 (20:47 +0200)]
Add configuration

A config file is placed in /etc/audisp/plugins.d/ so nice-lad
could act as a audispd's plugin.

Change-Id: Ia66638e83e4c1e15d8024ae3a3e2eb1c116d0fb8

9 years agoAdd Lad::Options 44/43744/1
Aleksander Zdyb [Mon, 29 Jun 2015 15:13:41 +0000 (17:13 +0200)]
Add Lad::Options

Wrapper for optional build and functional dependencies.

Change-Id: Id851f8cd34bc5bb61ef7a986757521a1be39114b

9 years agoAdd Systemd::DataCollector 43/43743/1
Aleksander Zdyb [Mon, 29 Jun 2015 15:10:21 +0000 (17:10 +0200)]
Add Systemd::DataCollector

Change-Id: I0ead7fd4de88dc5e315f059fcb7f242ef2e3ef53

9 years agoAdd Lad::DataCollector and Lad::SyslogDataCollector 42/43742/1
Aleksander Zdyb [Mon, 29 Jun 2015 15:10:01 +0000 (17:10 +0200)]
Add Lad::DataCollector and Lad::SyslogDataCollector

Change-Id: Icbbaa715ed943d1455c746adb45b2a41b0b7fc15

9 years agoImplement Lad::AuditRulesPopulator 41/43741/1
Aleksander Zdyb [Wed, 24 Jun 2015 12:56:46 +0000 (14:56 +0200)]
Implement Lad::AuditRulesPopulator

This class populates audit syscall rules in accordance to data
obtained from given data provider.

Change-Id: I6349abb6f98e253229969c53eee438dc406ed685

9 years agoAdd tests for SecurityManager::DataProvider 40/43740/1
Aleksander Zdyb [Tue, 23 Jun 2015 09:26:06 +0000 (11:26 +0200)]
Add tests for SecurityManager::DataProvider

Change-Id: Ide7e19c96a91b9e841746ca38ec28b9f0710c797

9 years agoImplement SecurityManager::DataProvider 39/43739/1
Aleksander Zdyb [Tue, 23 Jun 2015 09:25:13 +0000 (11:25 +0200)]
Implement SecurityManager::DataProvider

This class retrieves resource groups from SecurityManager.

Change-Id: Ic1c80d9cb10b5095738773e90d8f957c6d120525

9 years agoAdd Lad::DataProvider interface 38/43738/1
Aleksander Zdyb [Wed, 24 Jun 2015 12:49:21 +0000 (14:49 +0200)]
Add Lad::DataProvider interface

This interface will be used by plugable components to provide
resource groups and possibly other data.

Also implemented DummyDataProvider returning no groups.

Change-Id: I806334c429d7f239c57d0b9aeb3e2f203670afc8

9 years agoImplement SecurityManager::SecurityManagerWrapper 37/43737/1
Aleksander Zdyb [Tue, 23 Jun 2015 09:12:53 +0000 (11:12 +0200)]
Implement SecurityManager::SecurityManagerWrapper

This is an objective wrapper on SecurityManager's API.

Change-Id: Iafd1cbd22f22dde65d90b3427335a4abaa6fe884

9 years agoAdd tests for Audit::Auditctl 36/43736/1
Aleksander Zdyb [Mon, 22 Jun 2015 08:51:59 +0000 (10:51 +0200)]
Add tests for Audit::Auditctl

Change-Id: I93b1ab31a9cf029e2e31fc3c9825a6f7108183a6

9 years agoImplement Audit::Auditctl 35/43735/1
Aleksander Zdyb [Fri, 19 Jun 2015 12:08:08 +0000 (14:08 +0200)]
Implement Audit::Auditctl

This class is used to apply audit rules.

Change-Id: I93aa936837f664487360109a817d5e9830734149

9 years agoAdd tests for Audit::SyscallRuleData 34/43734/1
Aleksander Zdyb [Fri, 19 Jun 2015 09:55:52 +0000 (11:55 +0200)]
Add tests for Audit::SyscallRuleData

Change-Id: Id3a464b781d229d9aa93cd043547c3a218157504

9 years agoImplement Audit::SyscallRuleData 33/43733/1
Aleksander Zdyb [Fri, 19 Jun 2015 09:54:25 +0000 (11:54 +0200)]
Implement Audit::SyscallRuleData

This is an objective wrapper on libaudit's audit_rule_data.

Change-Id: Ie5d67e1fa3db0aac46e9b2927666d4d422ed71b8

9 years agoAdd objective wrappers for libaudit functions 32/43732/1
Aleksander Zdyb [Fri, 19 Jun 2015 09:38:16 +0000 (11:38 +0200)]
Add objective wrappers for libaudit functions

The wrapper is needed to make unit testing possible.

Change-Id: Ic3ca40e04d11d9151b8c0a8e358a4697a641cd22

9 years agoAdd tests for Lad::AuditEventHandler 31/43731/1
Aleksander Zdyb [Fri, 19 Jun 2015 09:44:38 +0000 (11:44 +0200)]
Add tests for Lad::AuditEventHandler

Change-Id: I37210bc9bb6315749a43c8c1ddfdf2b92dc0bfdd

9 years agoAdd AuditEventHandler 30/43730/1
Aleksander Zdyb [Mon, 29 Jun 2015 17:40:33 +0000 (19:40 +0200)]
Add AuditEventHandler

The class dispatches different types of audit event and collects
required properties according to type of event.

Change-Id: I492f93143489acc1bf72d6122b93a5e099c7c631

9 years agoAdd tests for Audit::Parser 29/43729/1
Aleksander Zdyb [Mon, 15 Jun 2015 09:00:49 +0000 (11:00 +0200)]
Add tests for Audit::Parser

Change-Id: I45f5da9fcbc37c5e6df2223f4c9a237c289dc9d8

9 years agoImplement Audit::Parser 28/43728/1
Aleksander Zdyb [Fri, 22 May 2015 10:20:46 +0000 (12:20 +0200)]
Implement Audit::Parser

It aggregates audit records. Invokes a callback, when full event
is collected.

Change-Id: I5bc1b526d88dc3b42c70965c3be38e25dab5401d

9 years agoAdd objective wrappers for auparse functions 27/43727/1
Aleksander Zdyb [Mon, 29 Jun 2015 16:08:43 +0000 (18:08 +0200)]
Add objective wrappers for auparse functions

The wrapper is needed to make unit testing possible.

Change-Id: I4c8a09ce722df525791c63e9a571abf527c3220b

9 years agoAdd feed utility 26/43726/1
Aleksander Zdyb [Fri, 22 May 2015 09:15:31 +0000 (11:15 +0200)]
Add feed utility

Feed successively reads chunks of data from given fd.
It invokes callback in case of:
* data read
* signal caught
* EOD encountered
* timeout

Change-Id: I1bcdfd51e2a9d90f552587ec337ed35097cd135c

9 years agoAdd helper utils for signal fd 25/43725/1
Aleksander Zdyb [Fri, 22 May 2015 09:10:08 +0000 (11:10 +0200)]
Add helper utils for signal fd

Change-Id: If2d5cd14ff3a66d3770d5282c8a88d113e8a3448

9 years agoInitialize tests 24/43724/1
Aleksander Zdyb [Mon, 15 Jun 2015 08:57:36 +0000 (10:57 +0200)]
Initialize tests

Change-Id: If526ef37babdc4466b7602f13e0615f7b370c25d

9 years agoImplement Utils::WithMessageException 23/43723/1
Aleksander Zdyb [Mon, 15 Jun 2015 08:25:39 +0000 (10:25 +0200)]
Implement Utils::WithMessageException

Generic exception with error message.

Change-Id: If14ed24861437dbadcf3880a62d1fccd7f6c822d

9 years agoAdd logging support 22/43722/1
Aleksander Zdyb [Fri, 22 May 2015 08:59:48 +0000 (10:59 +0200)]
Add logging support

Logging functions are borrowed from Cynara:
https://github.com/Samsung/cynara

Change-Id: I76752bc54085b08567c0f615be2ee9948d30f18c

9 years agoInitial empty repository
Aleksander Zdyb [Fri, 10 Jul 2015 12:49:48 +0000 (14:49 +0200)]
Initial empty repository

Change-Id: Ida453ec4aa4e66d73a07823c997cb6fd05fbcc0a