platform/core/security/security-manager.git
7 years agoBlock the possibility of privilege redefinition 24/128624/3
Dariusz Michaluk [Wed, 10 May 2017 14:12:44 +0000 (16:12 +0200)]
Block the possibility of privilege redefinition

Change-Id: I897915c799ab03ad93d8f9f191ecbd96da885f60

7 years agoTests for client license in db 44/128544/3
Dariusz Michaluk [Wed, 10 May 2017 09:42:46 +0000 (11:42 +0200)]
Tests for client license in db

Change-Id: I8b19fa8d40fc7e34820ee6b758e46a546a964ebc

7 years agoAdd serialization of tuple 57/128857/2
Bartlomiej Grzelewski [Thu, 11 May 2017 17:50:09 +0000 (19:50 +0200)]
Add serialization of tuple

Change-Id: I9f6f2855a6073b8493d531e381f880d70ab6c3cb

7 years agoPrepare database to store license 35/127535/6
Bartlomiej Grzelewski [Wed, 26 Apr 2017 13:38:55 +0000 (15:38 +0200)]
Prepare database to store license

Security-manager does not use license directly. Licenses
will be used by license-manager. Security manager just store
information about it's location and information about
dependencies between licenses and app defined privileges.

In current api both provider and client may store license.
License stored by provider should be treated more as a key
that will be used to verify signature stored as client license.

Change-Id: If54724aa7daf49be727aab67ac614047f035a05a

7 years agoPrepare API to support licensed privileges 54/128854/1
Bartlomiej Grzelewski [Thu, 11 May 2017 14:26:03 +0000 (16:26 +0200)]
Prepare API to support licensed privileges

Change-Id: I870ff76dc9fc8e5a2e53070a9deeab9ecba416f4

7 years agoMerge remote-tracking branch 'origin/tizen' into appdefined 65/126665/3
Bartlomiej Grzelewski [Mon, 24 Apr 2017 13:39:13 +0000 (15:39 +0200)]
Merge remote-tracking branch 'origin/tizen' into appdefined

Change-Id: I5b808b2fc5d0dfa3c8eb45af2cd38ce8deeb0bad

7 years agoRevert of changes related to privacy popups 95/125895/1
Radoslaw Bartosiak [Wed, 19 Apr 2017 07:54:02 +0000 (09:54 +0200)]
Revert of changes related to privacy popups

1. Revert "Replace usage of Ask User plugin with Privacy Deny Plugin"
This reverts commit da9a01bddc86d7ff022e03865846ddf1a104859e.
2. Revert "Add new API for handling privacy privileges during application launch"
This reverts commit a260bb3bd0450c460c897790f7e02d41a143f7d5.
3. Revert "Implement security_manager_prepare_app_privacy"
This reverts commit 1bf8c3adf21b50a6c24f7c0246884cf389941c93.
4. Revert "Migrate existing application policy to use new ask-user policies"
This reverts commit d48e161b135a0efa523846376c0e58a3cd83903e.
5. Revert "Adapt requirement names for askuser-notification to new naming"
This reverts commit 8960cd5a6d83be490d3ff0a29ca385fe937cae25.
6. Revert "Handle HW key input case from askuser popup."
This reverts commit 1c21b22455b2bce914e88b248a62da6f6903f250.
7 .Revert "Do not show toast fail launch popup for white list app."
This reverts commit e87aca1aa591c561a0dadd5038c5811e50aecde6.

Change-Id: I66149a6e4d5cdbabe4ec673b5c936cd1ed717e1f
Signed-off-by: Radoslaw Bartosiak <r.bartosiak@samsung.com>
7 years agoDo not show toast fail launch popup for white list app. 27/123127/2 privacy-popup-issue submit/tizen/20170405.143506
jin-gyu.kim [Tue, 4 Apr 2017 13:53:52 +0000 (22:53 +0900)]
Do not show toast fail launch popup for white list app.

- Toast fail launch popup is only allowed to non-white list app.

Change-Id: I606da84f4b65cebb6afd1f896d0b548ceaa62b47

7 years agoHandle HW key input case from askuser popup. 96/123096/4
jin-gyu.kim [Tue, 4 Apr 2017 11:03:25 +0000 (20:03 +0900)]
Handle HW key input case from askuser popup.

In case of HW key input, app should not be launched always.
Also, updating policy as DENY only for non-white list app.

Change-Id: I2956bc3b982a2ec68d9514e766366621530cfa27

7 years agoAdapt requirement names for askuser-notification to new naming 62/122862/1
Rafal Krypa [Mon, 3 Apr 2017 20:03:54 +0000 (22:03 +0200)]
Adapt requirement names for askuser-notification to new naming

- privacy-denied-plugins => askuser-plugins
- askuser-notification-ipc => askuser-notification

Change-Id: Ic735c1aaed9d21889032513dac5cb1585997cb5e
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
7 years agoMigrate existing application policy to use new ask-user policies 85/122485/3
Rafal Krypa [Fri, 31 Mar 2017 15:40:38 +0000 (17:40 +0200)]
Migrate existing application policy to use new ask-user policies

Migrate privacy manager policy:
- ask user => ASK_USER_LEGACY
- deny => PRIVACY_DENY

Change-Id: Icfeea3324c8d823d8a0065198b9a8c9329528be8
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
7 years agoImplement security_manager_prepare_app_privacy 15/120915/7
Rafal Krypa [Fri, 31 Mar 2017 11:38:34 +0000 (13:38 +0200)]
Implement security_manager_prepare_app_privacy

Change-Id: I9467a359672f5a1e3147a92ae2eb282a1e643b26
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
7 years agoAdd new API for handling privacy privileges during application launch 77/120677/7
Rafal Krypa [Thu, 23 Mar 2017 16:33:12 +0000 (17:33 +0100)]
Add new API for handling privacy privileges during application launch

New public function security_manager_prepare_app_privacy() to be called
by launcher. It will check application policy, generate pop-up if necessary,\
wait for user answer, modify policy accordingly and trigger toast message
if application launch has been prohibited.
The caller (launcher) should abort application launching if this function
returns an error.

Change-Id: Ia4b901cc409ccd8d695da8b53a0223bdb54c0cde
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
7 years agoReplace usage of Ask User plugin with Privacy Deny Plugin 79/120879/6
Rafal Krypa [Fri, 31 Mar 2017 15:23:31 +0000 (17:23 +0200)]
Replace usage of Ask User plugin with Privacy Deny Plugin

Some legacy application does not support run-time popups correctly.
We need to replace run-time popups (ask about) with toast popup.
Toast popups are supported by Privacy Denied plugin.

Change-Id: I7ae8eebc0c23863d2618ed66238da0e5f395e944

7 years agoChange labelPaths logic for FOTA 94/118094/2
Radoslaw Bartosiak [Wed, 8 Mar 2017 17:24:59 +0000 (18:24 +0100)]
Change labelPaths logic for FOTA

pkgBasePath is labeled only if there is at least one path argument for labelPaths
that points to pkgBasePath.

Change-Id: I81763a8a38aa89700e87daf708a5e85c37b6dd20
Signed-off-by: Radoslaw Bartosiak <r.bartosiak@samsung.com>
7 years agoRelease version 1.2.17 73/122073/1 accepted/tizen_common accepted/tizen_ivi accepted/tizen_mobile accepted/tizen_tv accepted/tizen_wearable accepted/tizen/common/20170331.152637 accepted/tizen/ivi/20170330.224836 accepted/tizen/mobile/20170330.224659 accepted/tizen/tv/20170330.224751 accepted/tizen/unified/20170330.224852 accepted/tizen/wearable/20170330.224816 submit/tizen/20170330.102312
jin-gyu.kim [Thu, 30 Mar 2017 05:50:12 +0000 (14:50 +0900)]
Release version 1.2.17

- Use %license macro to copy license file.
- Add "VALGRIND" build type
- Remove the redundant SharedRO SMACK rules.
- Unify method names in CynaraAdmin to pascal case
- Clean up cynara classes members names
- Free requests after processing them in cmd line tool
- Add missing ')' in cmd line tool usage description
- Allow version compatibility change during application upgrade
- Remove dependency between SM and DBUS
- Make it possible to use out-of-the-source build dir
- [Unit tests] for PrivilegeDb class - related to private path sharing
- Remove setting of CMAKE_C_FLAGS in the main CMakeLists.txt
- Fix inconsistent types error
- Log appId in case of errors in security_manager_prepare_app
- Remove setting of -DTIZEN_DEBUG_ENABLE compilation flag
- Remove unnecessary transaction rollback
- Remove empty lines from rules.merged file.
- Don't ignore errors in supplementary group setup during app launch preparation
- Fix thread synchronization in Cynara class

Change-Id: I47de688cd71fbee6ceb4bf7620a08c89c01c7a1c

7 years agoUse %license macro to copy license file. 97/121797/1
jin-gyu.kim [Wed, 29 Mar 2017 05:08:46 +0000 (14:08 +0900)]
Use %license macro to copy license file.

Change-Id: I64ef2355af0f3a2469931681150419df35bea884

7 years agoAdd "VALGRIND" build type 93/107893/4
Rafal Krypa [Fri, 30 Dec 2016 13:49:03 +0000 (14:49 +0100)]
Add "VALGRIND" build type

Separate build type specialized for debugging memory leaks.
Example usage with GBS for Tizen:
  $ gbs build --define "build_type VALGRIND"

Change-Id: I7e150609021508541427ff009fa28b97a6004daf

7 years agoRemove the redundant SharedRO SMACK rules. 34/111034/4
jin-gyu.kim [Thu, 19 Jan 2017 08:00:11 +0000 (17:00 +0900)]
Remove the redundant SharedRO SMACK rules.

- There was some redundant SharedRO SMACK rules.
- This change will give SharedRO rules only when pkg has shared folders.

Change-Id: Ic738c6bd49972de6a48d5ff18baa8360a92f22c0

7 years agoUnify method names in CynaraAdmin to pascal case 81/110281/3
Zofia Abramowska [Fri, 13 Jan 2017 13:47:39 +0000 (14:47 +0100)]
Unify method names in CynaraAdmin to pascal case

Change-Id: I42dbad2e0e0f54140036e2c5e8e53b9acd425d4b

7 years agoClean up cynara classes members names 80/110280/4
Zofia Abramowska [Fri, 13 Jan 2017 13:36:31 +0000 (14:36 +0100)]
Clean up cynara classes members names

Start member names with "m_" prefix and static member names with "s_".

Change-Id: I39c0e08981e797a188edd841c2c32c89f694d20c

7 years agoFix getPrivilegeProvider() implementation 95/119895/3
Dariusz Michaluk [Mon, 20 Mar 2017 11:36:04 +0000 (12:36 +0100)]
Fix getPrivilegeProvider() implementation

Check whether privilege is provided by a global application,
if it is not supplied by local application.

Change-Id: I630ae599df5f412447662ec505ddc2b8e817106b

7 years agoAdd logs to license-manager-agent 73/119573/1
Bartlomiej Grzelewski [Fri, 17 Mar 2017 08:39:58 +0000 (09:39 +0100)]
Add logs to license-manager-agent

Change-Id: I7f5709f98d3ba448e0ec39f9f5b4cfc419eef187

7 years agoSimple implementation of License Manager Agent 51/117851/3
Bartlomiej Grzelewski [Thu, 2 Mar 2017 13:35:42 +0000 (14:35 +0100)]
Simple implementation of License Manager Agent

This commit adds License Manager Agent daemon that will be responsible
for client/provider signature verification.

Change-Id: Ie78671311d679d800be0337ebe34f4afa6dfc799

7 years agoFree requests after processing them in cmd line tool 74/116974/4
Krzysztof Jackiewicz [Thu, 2 Mar 2017 07:24:07 +0000 (08:24 +0100)]
Free requests after processing them in cmd line tool

App installation and user management requests were not freed after their
processing is finished in security-manager-cmd. Pointers wrapped in
std::unique_ptr.

Change-Id: I689833dea78ccedb5aaac9267d3c0a06895f0568

7 years agoAdd API for getting privilege provider 93/118893/4
Dariusz Michaluk [Mon, 13 Mar 2017 14:12:18 +0000 (15:12 +0100)]
Add API for getting privilege provider

Change-Id: Ide1db72fc1338947dc6d8ce6c835dd5e42aad340

7 years agoAdd missing ')' in cmd line tool usage description 73/117073/2
Krzysztof Jackiewicz [Thu, 2 Mar 2017 13:28:28 +0000 (14:28 +0100)]
Add missing ')' in cmd line tool usage description

Change-Id: Iadbe5225f3eefd2048e0c5b17cdb1d643fd9181c

7 years agoFix buckets: aggregation of global and local instance privileges of an app 92/118092/3
Dariusz Michaluk [Wed, 1 Mar 2017 15:02:16 +0000 (16:02 +0100)]
Fix buckets: aggregation of global and local instance privileges of an app

Current Cynara bucket design has an issue of aggregation of privileges
of global and local instances of an applications,
meaning when app is installed both globally and locally it will gain a sum of it's privileges.

MANIFESTS bucket could be split into two:
MANIFESTS_GLOBAL - holding only rules for global applications (label * privilege ALLOW)
                   and redirections to second additional bucket
                   when applications is installed locally (label uid * bucket MANIFESTS_LOCAL)
MANIFESTS_LOCAL - have only local rules for local applications (label uid privilege ALLOW)
Both of them will have DENY by default.

Change-Id: Iba3da506fca570ca3e2147998d9012aa9e485b44

7 years agoAllow version compatibility change during application upgrade 97/118697/1
Rafal Krypa [Mon, 13 Mar 2017 15:28:28 +0000 (16:28 +0100)]
Allow version compatibility change during application upgrade

Security-manager should permit app installation request for cases where
the same app is already installed, but platform version for the app has
changed.

Change-Id: Ia8ffdc20c084b7ade18e3deeed6d17b081149a70
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
7 years agoRemove dependency between SM and DBUS 35/116235/2
Bartlomiej Grzelewski [Thu, 23 Feb 2017 10:47:50 +0000 (11:47 +0100)]
Remove dependency between SM and DBUS

Dependency between SM and DBUS was required to avoid deadlock.
Problem was already solved in DBUS initilization code commit:
https://review.tizen.org/gerrit/#/c/115757/

Change-Id: I34d98d1a75eb004bce0da0d664a64de61b9ab66a

7 years agoFix database scheme 25/116325/1
Bartlomiej Grzelewski [Thu, 23 Feb 2017 16:51:22 +0000 (17:51 +0100)]
Fix database scheme

Old scheme was generating cartesian product from
app_defined_privilege and uid table. It should generate
one row for application installed by one user.

Change-Id: Ic01c82eac655a43aa6454d9e519c91d3699bfcfd

7 years agoApp defined privileges in bucket/db 06/115606/5
Dariusz Michaluk [Tue, 21 Feb 2017 17:03:37 +0000 (18:03 +0100)]
App defined privileges in bucket/db

Add/update/remove app defined privileges during app installation/deinstallation.

Change-Id: I1e6544e03346d792548c80164d32ef1655ea7452

7 years agoFix typo: privilige -> privilege 35/116035/1
Dariusz Michaluk [Tue, 21 Feb 2017 13:13:28 +0000 (14:13 +0100)]
Fix typo: privilige -> privilege

Change-Id: Ia1ec3f6921ea4371130057dbfaf94471eeb51d72

7 years agoTests for app defined privileges in db 06/114706/7
Dariusz Michaluk [Mon, 13 Feb 2017 12:27:20 +0000 (13:27 +0100)]
Tests for app defined privileges in db

Change-Id: I6b08cac6488f564a51443597b8ddd7c48e3124a2

7 years agoAdd support for app defined privileges in db 05/114705/7
Dariusz Michaluk [Thu, 9 Feb 2017 11:07:29 +0000 (12:07 +0100)]
Add support for app defined privileges in db

Change-Id: I4ecf0940fa3716bdfe104e45491d3dc4eac21049

7 years agosecurity_manager_app_inst_req_add_app_defined_privilege() API change 29/115329/4
Dariusz Michaluk [Fri, 17 Feb 2017 09:56:09 +0000 (10:56 +0100)]
security_manager_app_inst_req_add_app_defined_privilege() API change

Change-Id: I97e6a385da4116f4e1655077516fb5e9b3eb1638

7 years agoAdd license manager plugin for cynara 41/114041/2
Bartlomiej Grzelewski [Wed, 1 Feb 2017 09:59:19 +0000 (10:59 +0100)]
Add license manager plugin for cynara

Change-Id: I9938d38828ca125049b82b18ac33266eb410cf28

7 years agoMake it possible to use out-of-the-source build dir 99/111499/3
Lukasz Pawelczyk [Fri, 20 Jan 2017 17:28:40 +0000 (02:28 +0900)]
Make it possible to use out-of-the-source build dir

Autogenerated files should be installed from the CMAKE_BINARY_DIR
instead of the CMAKE_SOURCE_DIR. This makes it possible to use the
build directory that's outside the source one.

Change-Id: I516b47f75dabed03bbf8253ea8cacad6c1b5001f

7 years agoAdd appDefinedPrivileges to app install request 37/113737/1
Radoslaw Bartosiak [Tue, 31 Jan 2017 14:53:50 +0000 (15:53 +0100)]
Add appDefinedPrivileges to app install request

Change-Id: I5db74f68b485482266392deef2f64c29d27b8ae2
Signed-off-by: Radoslaw Bartosiak <r.bartosiak@samsung.com>
7 years agoAdd APPDEFINED Cynara bucket 35/113735/1
Radoslaw Bartosiak [Fri, 27 Jan 2017 09:15:27 +0000 (10:15 +0100)]
Add APPDEFINED Cynara bucket

In order to support app-defined privileges and licence-manager
new bucket for storing these privileges is introduced.

Change-Id: I5e8cf96869489cd4f255efba31e37337e7925c74
Signed-off-by: Radoslaw Bartosiak <r.bartosiak@samsung.com>
7 years ago[Unit tests] for PrivilegeDb class - related to private path sharing 38/105838/11
Radoslaw Bartosiak [Mon, 19 Dec 2016 16:32:48 +0000 (17:32 +0100)]
[Unit tests] for PrivilegeDb class - related to private path sharing

     1) Split tests from test_privilege_db.cpp into smaller files.
     2) Add functions for test parameters creation (reduce the number
        of local parameters in the tests.
     3) Add test for src/common/include/privilege_db.h functions:
     GetPathSharingCount, GetOwnerTargetSharingCount,
     GetTargetPathSharingCount, ApplyPrivateSharing, DropPrivateSharing,
     GetAllPrivateSharing, GetPrivateSharingForOwner,
     GetPrivateSharingForTarget, SquashSharing, ClearPrivateSharing.

Change-Id: I930d34589ddb27420e2700d6dac4bdd244b83cfb
Signed-off-by: Radoslaw Bartosiak <r.bartosiak@samsung.com>
7 years agoRemove setting of CMAKE_C_FLAGS in the main CMakeLists.txt 29/108029/3
Rafal Krypa [Mon, 2 Jan 2017 09:37:42 +0000 (10:37 +0100)]
Remove setting of CMAKE_C_FLAGS in the main CMakeLists.txt

This is a C++-only project that never included any C code.
Setting CFLAGS in CMake is a pure clutter.

Change-Id: I580decb504f670476342d45d35fb31a43e30a508
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
7 years agoFix inconsistent types error 82/111982/1
Radoslaw Bartosiak [Wed, 25 Jan 2017 07:39:26 +0000 (08:39 +0100)]
Fix inconsistent types error

'lib_retcode' and 'int' both deduced for lambda return type caused buildbreak

Change-Id: Ic325edc33714853ca7c23e50e865c20c2c2e6fe4
Signed-off-by: Radoslaw Bartosiak <r.bartosiak@samsung.com>
7 years agoLog appId in case of errors in security_manager_prepare_app 68/108068/3
Rafal Krypa [Mon, 2 Jan 2017 15:12:35 +0000 (16:12 +0100)]
Log appId in case of errors in security_manager_prepare_app

When security_manager_prepare_app fails, the launcher that called this
function is supposed to treat it as serious error and stop further
application launching. Security-manager logs error description, but it
didn't include appId in the logs.

Change-Id: Iefdd398ba32c9f16bde2c011abea31949da41b6b
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
7 years agoRemove setting of -DTIZEN_DEBUG_ENABLE compilation flag 28/108028/3
Rafal Krypa [Mon, 2 Jan 2017 11:05:28 +0000 (12:05 +0100)]
Remove setting of -DTIZEN_DEBUG_ENABLE compilation flag

This is a legacy flag inherited from security-server code base.
Nothing in the code uses it.

Change-Id: I86208743ea25b92f4a0612f7f94ea12ed7419ca4
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
7 years agoRemove unnecessary transaction rollback 28/110628/3
Krzysztof Jackiewicz [Tue, 17 Jan 2017 08:16:13 +0000 (09:16 +0100)]
Remove unnecessary transaction rollback

Scoped transaction guarantees that changes will be rolled back in case of
exception. No need for another rollback.

Change-Id: If199dde2fb1c1cc19b4af710b6ebba2023e33eaa

7 years agoRemove empty lines from rules.merged file. 69/108269/2
Bartlomiej Grzelewski [Tue, 3 Jan 2017 17:36:54 +0000 (18:36 +0100)]
Remove empty lines from rules.merged file.

In some narrow case:
 * file have size of page_size+1
 * file ends with combination "\n\n"
kernel returns error during rules loading.

Change-Id: I6f24b76224c7b013c93003e8d0d6738b665c6949

7 years agoDon't ignore errors in supplementary group setup during app launch preparation 36/93436/3
Rafal Krypa [Mon, 24 Oct 2016 09:07:53 +0000 (11:07 +0200)]
Don't ignore errors in supplementary group setup during app launch preparation

API function security_manager_prepare_app calls several steps for setting
up application context. One of the steps, setting supplementary groups
based on application privileges, was allowed to fail. In such case
the function logged warning but proceeded ignoring the error.

This was introduced as a work-around for easier security-manager integration
on the platform. Back then, we had a platform that didn't register applications
in security-manager and tried to launch them. To allow such case temporarily,
security-manager tried to launch app even if it wasn't present in database.

This is no longer the case. All applications should be properly registered
in security-manager database prior to launching. And if they aren't, launching
will fail on another step that was added later.
Security-manager should not longer ignore errors and skip steps in
security_manager_prepare_app.

Change-Id: I07b49a40db93830b46137502f7743b6b95ad7fd5
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
7 years agoFix thread synchronization in Cynara class 55/109955/3
Rafal Krypa [Wed, 11 Jan 2017 13:13:36 +0000 (14:13 +0100)]
Fix thread synchronization in Cynara class

Pass changes to cynaraFd and fd events to be polled via atomic variables
and over atomic_thread_fence to properly propagate changes to these
values between checking threads and communication thread.

Change-Id: I9b41a0f8e40365bc30cdd47ed04be8727521476e
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
7 years agoRelease version 1.2.16 77/111577/2 accepted/tizen/common/20170123.182157 accepted/tizen/ivi/20170123.114031 accepted/tizen/mobile/20170123.113939 accepted/tizen/tv/20170123.113955 accepted/tizen/unified/20170309.033943 accepted/tizen/wearable/20170123.114014 submit/tizen/20170123.035947 submit/tizen_unified/20170308.100409
jooseong lee [Mon, 23 Jan 2017 01:57:12 +0000 (10:57 +0900)]
Release version 1.2.16

- Fix in generateAppPkgNameFromLabel implementation
- [Unit tests] Add test for src/common/include/smack-labels.h
- [Unit tests] Add test for src/common/include/smack-rules.h
- Remove default dependency in cleanup service

Change-Id: I7c907b3181bf0764899481530216a20e306fe2f5
Signed-off-by: jooseong lee <jooseong.lee@samsung.com>
7 years agoRemove default dependency in cleanup service 76/111576/2
Sunmin Lee [Mon, 23 Jan 2017 01:39:19 +0000 (10:39 +0900)]
Remove default dependency in cleanup service

Although security-manager-cleanup.service is installed
at sysinit.target.wants, it has a dependency on basic.target.
It would cause undesirable dependency between sysinit and basic target.

Change-Id: I44a4a151fd247cbe9b182f657c0dd21af3cf5ce4
Signed-off-by: jooseong lee <jooseong.lee@samsung.com>
7 years ago[Unit tests] Add test for src/common/include/smack-rules.h 64/107764/8
Dariusz Michaluk [Wed, 28 Dec 2016 12:23:20 +0000 (13:23 +0100)]
[Unit tests] Add test for src/common/include/smack-rules.h

Change-Id: I5f3816c7559465c8a59a06d47c7ded51ef69b1ed

7 years ago[Unit tests] Add test for src/common/include/smack-labels.h 63/107763/5
Dariusz Michaluk [Mon, 19 Dec 2016 13:19:10 +0000 (14:19 +0100)]
[Unit tests] Add test for src/common/include/smack-labels.h

Change-Id: I2cfdf300490509c77a6b65e11abf0b13aa4f951b

7 years agoFix in generateAppPkgNameFromLabel implementation 47/109547/2
Dariusz Michaluk [Tue, 10 Jan 2017 09:37:46 +0000 (10:37 +0100)]
Fix in generateAppPkgNameFromLabel implementation

appName is not overwritten in case of non-hybrid apps.

Change-Id: I3063c10281ec3afcccbcca097076cd0f87936f6b

7 years agoRelese version 1.2.15 52/110752/1
jooseong lee [Wed, 18 Jan 2017 01:03:56 +0000 (10:03 +0900)]
Relese version 1.2.15

- Split service cleanup in two parts to prevent std::terminate
- Use real path of skel dir

Change-Id: I95dcc4b4afc351f2de1e94e4b3b0d14f13812f72
Signed-off-by: jooseong lee <jooseong.lee@samsung.com>
7 years agoUse real path of skel dir. 15/110415/4
jin-gyu.kim [Mon, 16 Jan 2017 10:08:19 +0000 (19:08 +0900)]
Use real path of skel dir.

- Real path of skel dir can be diffrent based on target types.
- Convert skel dir in getSkelPkgDir to the real path.
- Add error handling in getSkelPkgDir

Change-Id: Ifdd94a07f69da091a8f07b7fd55223fd157284b6

7 years agoSplit service cleanup in two parts to prevent std::terminate 74/110474/3
Krzysztof Jackiewicz [Mon, 16 Jan 2017 15:37:44 +0000 (16:37 +0100)]
Split service cleanup in two parts to prevent std::terminate

If ServiceThread is being destroyed and it's about to process an event (the
service thread popped an event from m_eventQueue) it may lead to calling a
virtual function on a partially destroyed object.

Thread cleanup has been separated from ServiceThread destructor to avoid such
situations.

Change-Id: I31f08d18a72b597002063619bd2e84a5a1da0899

7 years agoRelese version 1.2.14 79/110279/1 accepted/tizen/3.0/common/20170118.130734 accepted/tizen/3.0/ivi/20170118.042542 accepted/tizen/3.0/mobile/20170118.042450 accepted/tizen/3.0/tv/20170118.042515 accepted/tizen/3.0/wearable/20170118.042529 accepted/tizen/common/20170116.181531 accepted/tizen/ivi/20170117.053526 accepted/tizen/mobile/20170117.053439 accepted/tizen/tv/20170117.053455 accepted/tizen/wearable/20170117.053508 submit/tizen/20170116.051423 submit/tizen_3.0/20170115.225845
Tomasz Swierczek [Fri, 13 Jan 2017 13:20:13 +0000 (14:20 +0100)]
Relese version 1.2.14

- Add missing exception handler for TizenPlatformConfig
- Add support for blacklist privileges using policy manager
- Wake up Cynara async thread from statusCallback
- Make sure transaction is rolled back in case of error

Change-Id: I63601e59b3ca7f2857f2ec2aa88161910e98b7d5

7 years agoAdd missing exception handler for TizenPlatformConfig 29/108629/6
Krzysztof Jackiewicz [Thu, 5 Jan 2017 08:36:33 +0000 (09:36 +0100)]
Add missing exception handler for TizenPlatformConfig

Change-Id: I97f58249c3d3b9df99aa14623252c597ae5f6e3a

7 years agoAdd support for blacklist privileges using policy manager 96/108496/13
Krzysztof Jackiewicz [Wed, 4 Jan 2017 14:34:21 +0000 (15:34 +0100)]
Add support for blacklist privileges using policy manager

Privilege privacy status (& default policy) now relies also on UID and application.
This patch introduces integration with privilege-checker API that allows to check
privilege status in context of these attributes.

Change-Id: I8bf25cf708ed21a7af9cc047f01fff3ff8410dcc

7 years agoWake up Cynara async thread from statusCallback 72/109772/2
Rafal Krypa [Wed, 11 Jan 2017 08:38:52 +0000 (09:38 +0100)]
Wake up Cynara async thread from statusCallback

Until now the thread handling communication with Cynara was woken up
when new check was prepared for sending because cynara_async_create_request
was expected to trigger statusCallback. When new data is prepared for
sending to Cynara service, statusCallback requests that the cynara descriptor
must be polled for writing and when it's ready, cynara_async_process will
send the data to socket.

But since Cynara release 0.12.0, cynara_async_check_cache may also trigger
a statusCallback. This is because of underlying monotir entries and their
periodic flush to Cynara service. This behavior of Cynara is not documented.

To make sure that security-manager will restart polling of Cynara socket
each time after statusCallback is triggered, the callBack itself will now
take care of waking up the thread responsible for communication with Cynara.

Change-Id: I8f9bf323166fccd97612dd85ec35c9befe5d00f9
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
7 years agoMake sure transaction is rolled back in case of error 77/109777/3
Krzysztof Jackiewicz [Wed, 11 Jan 2017 13:34:34 +0000 (14:34 +0100)]
Make sure transaction is rolled back in case of error

Until now in case of error/exception during client request processing
(appInstall, appUninstall, pathsRegister) the database transaction was not
always rolled back.

All affected functions now use ScopedTransaction to guarantee the rollback.

Change-Id: I968739a05b845d3c74449dfdfe4078c68e8f3cf1

7 years agoRelease version 1.2.13 65/108565/1 accepted/tizen/3.0/common/20170109.083930 accepted/tizen/3.0/ivi/20170106.095007 accepted/tizen/3.0/mobile/20170106.094811 accepted/tizen/3.0/tv/20170106.094909 accepted/tizen/3.0/wearable/20170106.094937 accepted/tizen/common/20170110.085205 accepted/tizen/ivi/20170106.103639 accepted/tizen/mobile/20170106.103436 accepted/tizen/tv/20170106.103529 accepted/tizen/wearable/20170106.103604 submit/tizen/20170105.051706 submit/tizen_3.0/20170105.051635
jin-gyu.kim [Thu, 5 Jan 2017 05:44:32 +0000 (14:44 +0900)]
Release version 1.2.13

- Fix memory leak in CynaraAdminPolicy move operator
- Fix memory leak in CheckProperDrop::getThreads()
- Don't put empty lines in generated Smack policy
- Set Cynara client cache size manually
- Fix compilation scripts.
- Replace read/write with send/recv
- Fix memory leak from cynara_async_configuration_create
- Fix comments in privilege_db.h regarding exceptions thrown by functions
- Fix in logs in IsPackageHybrid function
- Disable logs from SqlConnection
- Change auto_ptr to unique_ptr.
- Replace readdir_r to readdir.
- Don't accept wrong package id on app uninstall
- Remove ServicerImpl from derived Service class
- Fix in GetAllPrivateSharing implementation
- Enforce ownership of a shared path by one app.
- Change skel directory to /opt/etc/skel

Change-Id: If3885fd8f0908489fdd04ac31295f0932ffbbd1b

7 years agoChange skel directory to /opt/etc/skel 61/108561/1
jin-gyu.kim [Thu, 5 Jan 2017 05:31:59 +0000 (14:31 +0900)]
Change skel directory to /opt/etc/skel

Change-Id: I25fa30e9fa8530d8e6214793e6c293a928036401

7 years agoEnforce ownership of a shared path by one app. 05/104405/5
Radoslaw Bartosiak [Tue, 13 Dec 2016 08:10:26 +0000 (09:10 +0100)]
Enforce ownership of a shared path by one app.

owner_app_name is moved from table app_private_sharing to shared_path table.
Existing privilege_db constraints are used to assure that
a) a shared path is owned by one owner_app
b) a shared path's label is not changed

Change-Id: I36263fc5dc971c0da820fda44dad3b281d31c63e
Signed-off-by: Radoslaw Bartosiak <r.bartosiak@samsung.com>
7 years agoFix in GetAllPrivateSharing implementation 76/104076/3
Radoslaw Bartosiak [Mon, 12 Dec 2016 08:14:21 +0000 (09:14 +0100)]
Fix in GetAllPrivateSharing implementation

For every owner_app_name each path is now returned only once

Change-Id: Ie8362f7aad515a7000eedf772c0258f6fe7d3eb5
Signed-off-by: Radoslaw Bartosiak <r.bartosiak@samsung.com>
7 years agoRemove ServicerImpl from derived Service class 89/104189/2
Zofia Abramowska [Mon, 12 Dec 2016 14:26:16 +0000 (15:26 +0100)]
Remove ServicerImpl from derived Service class

ServiceImpl singleton was improperly stored in both
derived and base class resulting in two instances.

Change-Id: Ia27c9a45946bffabd37b23a0626c555ed2e7f0f6

7 years agoDon't accept wrong package id on app uninstall 60/107360/2
Zofia Abramowska [Mon, 19 Dec 2016 16:44:09 +0000 (17:44 +0100)]
Don't accept wrong package id on app uninstall

Security-manager service shouldn't accept wrong package id
for application uninstall request.

Change-Id: Ia6836c6e668d39255069b0d0bf1a554457f25c6f

7 years agoReplace readdir_r to readdir. 61/105861/3
jin-gyu.kim [Tue, 20 Dec 2016 01:02:19 +0000 (10:02 +0900)]
Replace readdir_r to readdir.

- readdir_r causes warning in gnu11.

Change-Id: I237a5f9d56061807b94a1a261b95db58f19216e8

7 years agoChange auto_ptr to unique_ptr. 30/105330/2
jin-gyu.kim [Fri, 16 Dec 2016 08:18:57 +0000 (17:18 +0900)]
Change auto_ptr to unique_ptr.

- Using auto_ptr causes warning in gnu11.

Change-Id: I89c09f29478639d9de9ad29edde62971754eb25e

7 years agoDisable logs from SqlConnection 42/99642/2
Zofia Abramowska [Fri, 4 Nov 2016 10:03:27 +0000 (11:03 +0100)]
Disable logs from SqlConnection

Add DB_LOGS definition to switch db logs on/off.
Disable them by default.

Change-Id: I038242bd63cfad38cd7804b5ada0d47f35caaa54

7 years agoFix in logs in IsPackageHybrid function 19/102319/3
Radoslaw Bartosiak [Mon, 5 Dec 2016 10:04:46 +0000 (11:04 +0100)]
Fix in logs in IsPackageHybrid function

Log description was wrong (copy and paste from previous function)

Change-Id: Id9e5aaece27b4a42d0e59b8b628bb2736692b9fa
Signed-off-by: Radoslaw Bartosiak <r.bartosiak@samsung.com>
7 years agoFix comments in privilege_db.h regarding exceptions thrown by functions 80/102380/3
Radoslaw Bartosiak [Mon, 5 Dec 2016 12:23:11 +0000 (13:23 +0100)]
Fix comments in privilege_db.h regarding exceptions thrown by functions

Change DB::SqlConnection::Exception::* to PrivilegeDb::Exception::*

Change-Id: I7e42d9b97f1a7e517757a8cd205c64f7b68ec9b6
Signed-off-by: Radoslaw Bartosiak <r.bartosiak@samsung.com>
7 years agoFix memory leak from cynara_async_configuration_create 23/108023/2
Rafal Krypa [Mon, 2 Jan 2017 10:45:37 +0000 (11:45 +0100)]
Fix memory leak from cynara_async_configuration_create

The previous patch has introduced a memory leak by always passing NULL
pointer to cynara_async_configuration_destroy instead of proper pointer.

Change-Id: I252e3c36b02e493f6cac6b4718edddb282d0c9eb
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
7 years agoReplace read/write with send/recv 27/105127/2
Bartlomiej Grzelewski [Thu, 15 Dec 2016 11:44:46 +0000 (12:44 +0100)]
Replace read/write with send/recv

New implementation does not require to mask SIGPILE singal in client.

Change-Id: I88338d10547f3ec521f12a83bfdb6d8391ef6bec

7 years agoFix compilation scripts. 72/85272/2
Bartlomiej Grzelewski [Wed, 24 Aug 2016 10:02:46 +0000 (12:02 +0200)]
Fix compilation scripts.

security-manager does not build when libraries are placed in
non standard directories.

Change-Id: I76f9900ac110c0f563b3948cd63a14d3b8e4ac45

7 years agoSet Cynara client cache size manually 67/107567/2
Zofia Abramowska [Tue, 27 Dec 2016 16:37:37 +0000 (17:37 +0100)]
Set Cynara client cache size manually

Cynara client cache shouldn't take too much memory.
Setting cache size manually ensures low memory consumption.

Change-Id: I31c195de4f97f82f7c2090056d800c54617accab

7 years agoDon't put empty lines in generated Smack policy 76/104776/4
Rafal Krypa [Wed, 14 Dec 2016 08:49:12 +0000 (09:49 +0100)]
Don't put empty lines in generated Smack policy

Empty lines in Smack policy are invalid. In most cases we get away with
them as kernel manages to filter them out and ignore.
There are however some nasty corner cases causing kernel to reject policy
with an empty line.

This change removes the cause for empty lines appearing in policy, updates
existing policy and modifies policy generation code to skip empty lines
by default, if they appear in policy templates again.

Change-Id: Id875523d2269ff8466898e9bef9b2a0b81387378
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
7 years agoFix memory leak in CheckProperDrop::getThreads() 49/106149/1
Krzysztof Jackiewicz [Tue, 20 Dec 2016 12:36:43 +0000 (13:36 +0100)]
Fix memory leak in CheckProperDrop::getThreads()

Change-Id: If43c2d3bc49e55b432de91f31f8dd4eb9b1d7925

7 years agoFix memory leak in CynaraAdminPolicy move operator 16/105816/2
Krzysztof Jackiewicz [Mon, 19 Dec 2016 11:03:28 +0000 (12:03 +0100)]
Fix memory leak in CynaraAdminPolicy move operator

Free strings allocated in "this" object when another one is moved to it.
Provide default destructor to avoid unnecessary allocation/frees.

Change-Id: I9f3658102db33eca19fff07e0cb04d47c26ca195

7 years agoRelease version 1.2.12 36/104636/1 accepted/tizen_3.0.m2_mobile accepted/tizen_3.0.m2_tv accepted/tizen_3.0.m2_wearable tizen_3.0.m2 accepted/tizen/3.0.m2/mobile/20170104.141704 accepted/tizen/3.0.m2/tv/20170104.142129 accepted/tizen/3.0.m2/wearable/20170104.142410 accepted/tizen/3.0/common/20161214.074627 accepted/tizen/3.0/ivi/20161214.070836 accepted/tizen/3.0/mobile/20161214.070753 accepted/tizen/3.0/tv/20161214.070806 accepted/tizen/3.0/wearable/20161214.070816 accepted/tizen/common/20161214.160801 accepted/tizen/ivi/20161214.085710 accepted/tizen/mobile/20161214.085620 accepted/tizen/tv/20161214.085633 accepted/tizen/wearable/20161214.085653 submit/tizen/20161214.030042 submit/tizen/20161214.045057 submit/tizen_3.0.m2/20170104.093751 submit/tizen_3.0/20161214.025951 submit/tizen_3.0/20161214.045158
jooseong lee [Wed, 14 Dec 2016 02:26:04 +0000 (11:26 +0900)]
Release version 1.2.12

-Allow privileged caller to configure privacy manager for other users

Change-Id: I38acd5508439a0aceb9cc1e7752064518b89e9ea
Signed-off-by: jooseong lee <jooseong.lee@samsung.com>
7 years agoAllow privileged caller to configure privacy manager for other users 62/104562/1
Rafal Krypa [Tue, 13 Dec 2016 13:42:12 +0000 (14:42 +0100)]
Allow privileged caller to configure privacy manager for other users

When policy update is sent with security_manager_policy_update_send(),
the policy record type determines target Cynara bucket. For policies
targeted at privacy manager bucket, privileged caller might want to
set policies for other users.

This is now allowed if the caller has proper privilege.

Change-Id: Ibcf13a1d6a7e4b2b965f1d0ca7599e65ee8b616c
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
7 years agoRelease version 1.2.11 23/104423/1 accepted/tizen/ivi/20161214.015455 accepted/tizen/mobile/20161214.015403 accepted/tizen/tv/20161214.015437 accepted/tizen/wearable/20161214.015444 submit/tizen/20161213.083628 submit/tizen_3.0/20161213.083334
jin-gyu.kim [Tue, 13 Dec 2016 08:55:02 +0000 (17:55 +0900)]
Release version 1.2.11

Change-Id: Ib51bc77625b73f4cbb6b7b3edfd4a1285cf69c15

7 years agoMap email privilege to priv_email 99/104299/1
jin-gyu.kim [Tue, 13 Dec 2016 04:51:09 +0000 (13:51 +0900)]
Map email privilege to priv_email

Change-Id: Ia61fae319b4d196891af503b8488581babd53fb6

7 years agoRelease version 1.2.10 97/103597/1 accepted/tizen/3.0/common/20161209.161115 accepted/tizen/3.0/ivi/20161209.104227 accepted/tizen/3.0/mobile/20161209.104134 accepted/tizen/3.0/tv/20161209.104152 accepted/tizen/3.0/wearable/20161209.104212 accepted/tizen/common/20161209.061511 accepted/tizen/ivi/20161209.060936 accepted/tizen/mobile/20161209.060829 accepted/tizen/tv/20161209.060852 accepted/tizen/wearable/20161209.060911 submit/tizen/20161209.021531 submit/tizen_3.0/20161209.021552
jooseong lee [Fri, 9 Dec 2016 02:06:46 +0000 (11:06 +0900)]
Release version 1.2.10

- Add transmute rule between non-hybrid app and RW path

Change-Id: I623d615edff86a1029a8f393bd0fc8236450da1d
Signed-off-by: jooseong lee <jooseong.lee@samsung.com>
7 years agoAdd transmute rule between non-hybrid app and RW path 10/103210/2
Zofia Abramowska [Wed, 7 Dec 2016 10:23:36 +0000 (11:23 +0100)]
Add transmute rule between non-hybrid app and RW path

After app process label refactoring there were no more
rule for transmute between label of app process and
label of path RW for non-hybrid (because labels were
the same). This introduced problem with transmute
inheritance : main app directory had transmute,
but it wasn't inherited by subdirectories.

This commit brings back rule between app process label
and path RW label even when both labels are the same.
Also proper policy migration is created, so already
installed apps have this rule also generated.

Change-Id: I98a34a29b2c2490d1dcafd43a117b509a763d72e

7 years agoRelease version 1.2.9 07/103007/1 accepted/tizen/3.0/common/20161207.195247 accepted/tizen/3.0/ivi/20161207.070618 accepted/tizen/3.0/mobile/20161207.070523 accepted/tizen/3.0/tv/20161207.070541 accepted/tizen/3.0/wearable/20161207.070559 accepted/tizen/common/20161207.184305 accepted/tizen/ivi/20161208.011356 accepted/tizen/mobile/20161208.011256 accepted/tizen/tv/20161208.011311 accepted/tizen/wearable/20161208.011336 submit/tizen/20161207.045135 submit/tizen_3.0/20161207.044923
jooseong lee [Wed, 7 Dec 2016 04:30:41 +0000 (13:30 +0900)]
Release version 1.2.9

- Properly handle case of unknown "Ask user" policy

Change-Id: I2d58cd7d4d0fabef3649dc0ebed6f235305c183a
Signed-off-by: jooseong lee <jooseong.lee@samsung.com>
7 years agoProperly handle case of unknown "Ask user" policy 28/102628/1
Krzysztof Jackiewicz [Tue, 6 Dec 2016 08:14:49 +0000 (09:14 +0100)]
Properly handle case of unknown "Ask user" policy

If askuser plugin is not registered in cynara (as in case of headless image)
CynaraAdmin::convertToPolicyType() couldn't find the policy type and was
throwing an exception.

In such cases security-manager will catch the exception and skip the code
related to askuser.

Change-Id: Ie2182a0936e62594a91bcdf22c39997ef9a65f9f

7 years agoRelease version 1.2.8 83/102083/1 accepted/tizen/3.0/common/20161206.125248 accepted/tizen/3.0/ivi/20161205.234428 accepted/tizen/3.0/mobile/20161205.234232 accepted/tizen/3.0/tv/20161205.234335 accepted/tizen/3.0/wearable/20161205.234400 accepted/tizen/common/20161205.135856 accepted/tizen/ivi/20161205.232846 accepted/tizen/mobile/20161205.232752 accepted/tizen/tv/20161205.232806 accepted/tizen/wearable/20161205.232826 submit/tizen/20161205.023558 submit/tizen_3.0/20161205.022357 submit/tizen_3.0/20161205.022817
jooseong lee [Mon, 5 Dec 2016 02:16:39 +0000 (11:16 +0900)]
Release version 1.2.8

- Add new parameter of isPrivacy function - pkgName

Change-Id: Ic0ca86b1ef365334a96d007e9ec3942634522035
Signed-off-by: jooseong lee <jooseong.lee@samsung.com>
7 years agoAdd new parameter of isPrivacy function - pkgName 29/101929/1
Kidong Kim [Fri, 2 Dec 2016 10:46:46 +0000 (19:46 +0900)]
Add new parameter of isPrivacy function - pkgName

The preloaded application should have all privacy related privileges
except location privilege.
So privilege-checker will manage whitelist of preloaded package names
and package name should be stored in isPrivacy function.
This is work-around patch.

Change-Id: I3ded5561fe003bb4ca95dfa9ef87965ef39d1d04
Signed-off-by: Kidong Kim <kd0228.kim@samsung.com>
7 years agoRelease version 1.2.7 94/101594/1
Bartlomiej Grzelewski [Thu, 1 Dec 2016 13:53:47 +0000 (14:53 +0100)]
Release version 1.2.7

- Fix in GetGroups implementation
- Add security_manager_shm_open

Change-Id: I4dd790362bbd9f14a54bfae22ef10c3a91a6dff7

7 years ago[Unit tests] for PrivilegeDb class - related to privileges 21/100821/2
Radoslaw Bartosiak [Tue, 29 Nov 2016 09:24:45 +0000 (10:24 +0100)]
[Unit tests] for PrivilegeDb class - related to privileges

Add test for src/common/include/privilege_db.h:
- GetGroups
- GetGroupsRelatedPrivileges

Change-Id: I877c5ea155855b2ad128cd86bffd215d067eace1
Signed-off-by: Radoslaw Bartosiak <r.bartosiak@samsung.com>
7 years agoFix in GetGroups implementation 15/99315/5
Radoslaw Bartosiak [Tue, 22 Nov 2016 09:47:00 +0000 (10:47 +0100)]
Fix in GetGroups implementation

SQL query is changed in order to return group only once.

Change-Id: Ibaec3ea6033544f35ebe67beec056580bcbea373
Signed-off-by: Radoslaw Bartosiak <r.bartosiak@samsung.com>
7 years ago[Unit tests] for PrivilegeDb class - related to app add/remove 52/98252/6
Radoslaw Bartosiak [Wed, 9 Nov 2016 11:01:20 +0000 (12:01 +0100)]
[Unit tests] for PrivilegeDb class - related to app add/remove

Add test for src/common/include/privilege_db.h

Change-Id: I66007e0170a290f958bb8070caa3c5f42a0dc599
signed-off-by: Radoslaw Bartosiak <r.bartosiak@samsung.com>

7 years agoUse recently introduced ClientRequest class in security_manager_shm_open 68/93668/2
Rafal Krypa [Tue, 25 Oct 2016 08:13:07 +0000 (10:13 +0200)]
Use recently introduced ClientRequest class in security_manager_shm_open

Use helper class for client communication with service instead of manual
Serialize/sendToServer/Deserialize.

Change-Id: Ia18a9caa03e0f1626487c1048ba5b629fd8109b7
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
7 years agoAdd security_manager_shm_open 20/74520/17
Bartlomiej Grzelewski [Mon, 13 Jun 2016 10:06:19 +0000 (12:06 +0200)]
Add security_manager_shm_open

This function will create file that may be used
by shm_open and mmap functions. If the file
exists noting is done.

Change-Id: Ifdfdf15df96fb67faa4340d113445527c77ba60f

7 years agoModify SmackLabels module 19/74519/11
Bartlomiej Grzelewski [Mon, 13 Jun 2016 10:05:46 +0000 (12:05 +0200)]
Modify SmackLabels module

Added:
 * getSmackLabelFromFd - extracts smack label from file descriptor
 * setSmackLabelForFd - sets smack label for file connected with fd
Modify:
 * pathSetSmack - use libsmack instead of lsetxattr

Change-Id: Ia5ceda42afc98dde0c8b7db2c0d0a0827efc4fa2

7 years agoCleanup: Usage of pragma once instead guard names in headers 96/89196/6
Radoslaw Bartosiak [Thu, 22 Sep 2016 11:49:24 +0000 (13:49 +0200)]
Cleanup: Usage of pragma once instead guard names in headers

Additionally: fixes in @files, remove of multiple newlines at EOF

Change-Id: I58d8b1e11fbc4709dc61229ea6e83098217c67dd
Signed-off-by: Radoslaw Bartosiak <r.bartosiak@samsung.com>
7 years agoUse new libsmack function smack_new_label_from_process 72/92872/2
Rafal Krypa [Wed, 19 Oct 2016 07:47:28 +0000 (09:47 +0200)]
Use new libsmack function smack_new_label_from_process

Drop custom implementation of fetch Smack label from a running process.
Replace it with libsmack function smack_new_label_from_process, introcuded
in version 1.3.0 of the library.

Change-Id: If90845c565c47980f8b4b407b0b19906a957372e

7 years agoRemove unused local variables in service_impl.cpp 39/98739/1
Radoslaw Bartosiak [Fri, 18 Nov 2016 11:18:41 +0000 (12:18 +0100)]
Remove unused local variables in service_impl.cpp

Change-Id: I56fa74d7e338419375f1d1cb0f4fdb5f937eb792
Signed-off-by: Radoslaw Bartosiak <r.bartosiak@samsung.com>