platform/core/test/security-tests.git
6 years agoSupport more types of application paths 85/158085/3
Zofia Abramowska [Fri, 20 Oct 2017 14:50:04 +0000 (16:50 +0200)]
Support more types of application paths

Add different root types of application:
EXTENDED and SKEL.
This is connected with places, where application
can put its own files.

Change-Id: I123206ac50d779f8f557067e18b43753101b4c5e

6 years agoMerge branch 'security-manager' into tizen 30/156730/1
Zofia Abramowska [Thu, 19 Oct 2017 16:57:08 +0000 (18:57 +0200)]
Merge branch 'security-manager' into tizen

Change-Id: I59af714f504f23c49c9fd7111afd1d4ff62bbd04

6 years agoMove scoped installer to commons 24/156724/1
Zofia Abramowska [Thu, 19 Oct 2017 15:43:21 +0000 (17:43 +0200)]
Move scoped installer to commons

Change-Id: Ica11bbb06be6eeecf2377e142b2fb89ef8b82222

6 years agoMerge branch 'tizen' into security-manager 23/156723/1
Zofia Abramowska [Thu, 19 Oct 2017 15:39:54 +0000 (17:39 +0200)]
Merge branch 'tizen' into security-manager

Change-Id: I3fa314322c8005c432cbdcfca15043d3679622b9

6 years agoFix missing dependency to tzplatform-config in commons 22/156722/1
Zofia Abramowska [Thu, 19 Oct 2017 15:35:36 +0000 (17:35 +0200)]
Fix missing dependency to tzplatform-config in commons

Change-Id: Ie898f84c7058a6da76a3ccbb0295db574451489c

6 years agoFix multiple definitions of runInChild 21/156521/1
Zofia Abramowska [Wed, 18 Oct 2017 14:58:38 +0000 (16:58 +0200)]
Fix multiple definitions of runInChild

security-manager tests and cynara-tests both have
runInChild defined. This should be moved to tests
commons, so there would be no conflict in future.

Change-Id: I28b2ebf1b2d02ccb8a483f741b0a701bf46303b1

6 years agoFix security_manager_100_synchronize_credentials_test. 21/141821/6
Dariusz Michaluk [Tue, 1 Aug 2017 12:31:23 +0000 (14:31 +0200)]
Fix security_manager_100_synchronize_credentials_test.

Launcher security attributes (user, group, capabilities)
should be set before calling security_manager_prepare_app().

Change-Id: I38680bec6873e6b3ac51dbc4c2c2dbadbb62e307

6 years agoFix access to security_test_user directory. 33/155933/1
Dariusz Michaluk [Mon, 16 Oct 2017 12:06:52 +0000 (14:06 +0200)]
Fix access to security_test_user directory.

Change-Id: I0fbb57bae137d4d2c7804b9f5151c6a8ff8697a7

6 years agoMerge branch 'security-manager' into tizen 81/155581/1
Zofia Abramowska [Fri, 13 Oct 2017 15:13:58 +0000 (17:13 +0200)]
Merge branch 'security-manager' into tizen

Change-Id: I4567f7cb3ea9713125ba7afd799aa17d0f634aaf

6 years agoMove scoped installer to global commons 46/148746/2
Zofia Abramowska [Thu, 7 Sep 2017 15:01:49 +0000 (17:01 +0200)]
Move scoped installer to global commons

Change-Id: I9effa1a4cb6669f591d8d6ab7d2c39a1e6a7ba32

6 years agoMove label generation to global commons 45/148745/2
Zofia Abramowska [Thu, 7 Sep 2017 14:47:20 +0000 (16:47 +0200)]
Move label generation to global commons

Change-Id: Ic38d65e29394dc5b8e784a8af6b105460e52a259

6 years agoIgnore security_manager_shm_open() tests 96/143096/1
Dariusz Michaluk [Tue, 8 Aug 2017 11:20:30 +0000 (13:20 +0200)]
Ignore security_manager_shm_open() tests

Tests can be re-enabled after below commit merge.
https://review.tizen.org/gerrit/#/c/103763/

Change-Id: I6a7fd3d5d8aa87df76df63b3a2a7b46df6b0176b

6 years agoSM : Check if askuser is disabled in app policy tests 62/143062/2
Zofia Abramowska [Tue, 8 Aug 2017 09:13:46 +0000 (11:13 +0200)]
SM : Check if askuser is disabled in app policy tests

Change-Id: I2148b8eccddd561ac2514ab10348b885f2fdc48d

6 years agoSM : Count privacy privileges in app policy tests 61/143061/2
Zofia Abramowska [Tue, 8 Aug 2017 08:13:06 +0000 (10:13 +0200)]
SM : Count privacy privileges in app policy tests

Change-Id: I161a7975237cbec143065dacbbae9a90f8e1d2e5

6 years agoMerge branch 'security-manager' into tizen 45/140945/1
Dariusz Michaluk [Thu, 27 Jul 2017 07:48:57 +0000 (09:48 +0200)]
Merge branch 'security-manager' into tizen

Change-Id: I0c4c3d88c5a267aa1bbad3b0a9882abf5d256d25

6 years agoAdd tests for app fetching it's own policy 41/137141/4
Zofia Abramowska [Tue, 4 Jul 2017 13:16:46 +0000 (15:16 +0200)]
Add tests for app fetching it's own policy

Change-Id: I3428d9d47f30de5fb38e7d56eac8988d88cb902a

6 years agosecurity-manager: adapt to new API of security_manager_groups_get() 88/137788/1
Rafal Krypa [Fri, 7 Jul 2017 15:41:37 +0000 (17:41 +0200)]
security-manager: adapt to new API of security_manager_groups_get()

Function security_manager_groups_get() now returns array of gid_t instead
of array of strings.
Function security_manager_groups_free() has been dropped, group arrays
are now freed by plain free().

Change-Id: If7dc713d75f9cf0e7ff03b6b388bb9006512fe54

6 years agoFix missing includes from test_runner 40/137140/1
Zofia Abramowska [Tue, 4 Jul 2017 13:17:16 +0000 (15:17 +0200)]
Fix missing includes from test_runner

Change-Id: I6d2ee7ba2825132f338e6d349fcc4ab17a727b2c

6 years agoInclude pkg_id in certificate CN entry 58/134458/1
Dariusz Michaluk [Fri, 16 Jun 2017 14:36:48 +0000 (16:36 +0200)]
Include pkg_id in certificate CN entry

Add test to verify stolen certificate.

Change-Id: Iab128a7d0a08f3215395f7182299ea28a70f8f74

6 years agoCheck returned code if data were not found 71/133271/2
Bartlomiej Grzelewski [Mon, 5 Jun 2017 16:27:41 +0000 (18:27 +0200)]
Check returned code if data were not found

Security-manager should inform client with code
SECURITY_MANAGER_ERROR_NO_SUCH_OBJECT that data
were not found.

Change-Id: I821880eb96e78d16db4a3ce455021dda20053043

6 years agoLocal application always hides global one 23/132223/2
Bartlomiej Grzelewski [Thu, 1 Jun 2017 13:56:24 +0000 (15:56 +0200)]
Local application always hides global one

Change-Id: I90ff98da6e41dab6522f97f03bd46803fb0b26a3

6 years agoAdd additional parameter to security_manager_get_client_privilege_license 59/131959/4
Bartlomiej Grzelewski [Tue, 30 May 2017 18:10:06 +0000 (20:10 +0200)]
Add additional parameter to security_manager_get_client_privilege_license

Change-Id: I1151db20ad44ae64a5312d8307404cc2f7fa3b57

6 years agoAdjust app defined privileges tests to license-manager changes 26/130526/9
Dariusz Michaluk [Mon, 22 May 2017 15:29:33 +0000 (17:29 +0200)]
Adjust app defined privileges tests to license-manager changes

Change-Id: I3b478b4e418e3df46e194cd13ec9524a57ab1d13

7 years agoMerge remote-tracking branch 'tizen/appdefined' into security-manager 56/129656/1
Bartlomiej Grzelewski [Wed, 17 May 2017 09:49:01 +0000 (11:49 +0200)]
Merge remote-tracking branch 'tizen/appdefined' into security-manager

Change-Id: I022e5423a4755cb4d25ab909c436a4121a54175a

7 years agoTest app defined privilege collision with system privileges 41/129241/2 appdefined
Dariusz Michaluk [Mon, 15 May 2017 13:58:18 +0000 (15:58 +0200)]
Test app defined privilege collision with system privileges

Change-Id: I17c140ed20acf2f66d00031eca257cfd0be8c9d9

7 years agoReplace std::string with Privilege class 49/129249/5
Bartlomiej Grzelewski [Mon, 15 May 2017 15:07:41 +0000 (17:07 +0200)]
Replace std::string with Privilege class

New privileges (LICENSED/UNTRUSTED) needs to store
addtional information. Using pair of privilege and
license started to be confusing and requires a lot
of conversions. Privilege hides additional information
inside class that makes test more readable.

Change-Id: Ie5fd90e1a8077b7de1521ab1702905d7c7281eb2

7 years agoAdd security_manager_get_client_privilege_license() tests 22/129022/2
Dariusz Michaluk [Fri, 12 May 2017 07:22:24 +0000 (09:22 +0200)]
Add security_manager_get_client_privilege_license() tests

Change-Id: I4270f58a8731010593c097252370b98200798edf

7 years agoAdd security_manager_get_app_defined_privilege_license() tests 06/128806/4
Dariusz Michaluk [Thu, 11 May 2017 11:28:46 +0000 (13:28 +0200)]
Add security_manager_get_app_defined_privilege_license() tests

Change-Id: I06dd2f8f0b6d8f501e69f7fa7c4289f07bd895c3

7 years agoAdjust tests to API change 30/128330/4
Dariusz Michaluk [Mon, 8 May 2017 17:24:45 +0000 (19:24 +0200)]
Adjust tests to API change

Change-Id: I80bf8674e371793af0ba28db57e35bb10e69520f

7 years agoMerge remote-tracking branch 'tizen/security-manager' into appdefined 83/126683/1
Bartlomiej Grzelewski [Mon, 24 Apr 2017 16:20:32 +0000 (18:20 +0200)]
Merge remote-tracking branch 'tizen/security-manager' into appdefined

Change-Id: I430ce5badf02a457c2f1dac9b3871d6e2ae3c65c

7 years agoMerge branch 'tizen' into security-manager 43/126443/1
Dariusz Michaluk [Fri, 21 Apr 2017 11:21:16 +0000 (13:21 +0200)]
Merge branch 'tizen' into security-manager

Change-Id: I7eaf08fb9052a738be0ed4d584e6eba53fe53f88

7 years agoRemove bad file after merge 42/126442/1
Zofia Abramowska [Fri, 21 Apr 2017 11:12:59 +0000 (13:12 +0200)]
Remove bad file after merge

Change-Id: Id30f75c0435dd1493f1ea33a96c85c6b523c1351

7 years agoMake 'runignored' option work as expected 74/125974/3
Piotr Sawicki [Wed, 19 Apr 2017 12:13:50 +0000 (14:13 +0200)]
Make 'runignored' option work as expected

Change-Id: I73214e9dd8ba06b72b8ce379ce8fd59a8e375d73

7 years agoFix build break caused by gcc/glibc/libstdc++ upgrade. 54/126154/2
Dariusz Michaluk [Thu, 20 Apr 2017 08:32:41 +0000 (10:32 +0200)]
Fix build break caused by gcc/glibc/libstdc++ upgrade.

Change-Id: Ie1fef0cfc63ac4fb5525f7d3731910c77cde9257

7 years agoMerge branch 'security-manager' into tizen 26/125226/2
Zofia Abramowska [Fri, 14 Apr 2017 07:32:36 +0000 (09:32 +0200)]
Merge branch 'security-manager' into tizen

Change-Id: I0f04e63fb07dd00e08c8ea8b595a14d2b04e3491

7 years agoAdd install type field to ScopedInstaller 22/121322/12
Piotr Sawicki [Mon, 27 Mar 2017 13:00:45 +0000 (15:00 +0200)]
Add install type field to ScopedInstaller

ScopedInstaller should use the same install type during installation and
removal of an application.

Change-Id: I50f73c50651dccb31427a6eb98a30a5b09d546f5

7 years agoAdd more security_manager_identify_privilege_provider() tests 21/119921/1
Dariusz Michaluk [Mon, 20 Mar 2017 13:31:17 +0000 (14:31 +0100)]
Add more security_manager_identify_privilege_provider() tests

Change-Id: Id5f0c41f23c41cdd1c6a34f1485628f4faaeb6e2

7 years agoPrevent exceptions in ScopedInstaller destructor 86/109786/4
Krzysztof Jackiewicz [Wed, 11 Jan 2017 13:57:47 +0000 (14:57 +0100)]
Prevent exceptions in ScopedInstaller destructor

Change-Id: Ibc52d27f0c0dd0cdb30233481a70e336b5302a73

7 years agoMerge branch 'tizen' into security-manager 36/119636/1
Krzysztof Jackiewicz [Sat, 18 Mar 2017 07:57:24 +0000 (08:57 +0100)]
Merge branch 'tizen' into security-manager

Change-Id: I12966cd0f6a6d0a38ddd73400918989e470c9e72

7 years agoAdd support for throwing RAII destructors 56/110056/7
Krzysztof Jackiewicz [Thu, 12 Jan 2017 11:16:26 +0000 (12:16 +0100)]
Add support for throwing RAII destructors

When a test finishes or fails the stack is unwinded some of such objects'
destructors still perform actions that may report an error/throw an exception.
If we just surround these actions with try/catch block we'll lose information
about errors in these destructors. If we let destructors throw it may lead to
program termination (unhandled exception during stack unwind caused by another
exception).

To prevent program termination and still get the information about errors in
destructors surround the throwing code in your RAII object destructor with
SafeCleanup::run.

Tests for cleanup exception handling are added and can be executed with:
cleanup_test.sh

Change-Id: Id4e257aadea9b18fe890c89d8f182082a7f191a3

7 years agoAdd security_manager_identify_privilege_provider() tests 94/118894/2
Dariusz Michaluk [Mon, 13 Mar 2017 16:32:12 +0000 (17:32 +0100)]
Add security_manager_identify_privilege_provider() tests

Change-Id: I56533a6e4675b1764597b22100f483e6ba8c9ec8

7 years agoAdjust test security_manager_09_app_install_constraint_check 98/118698/2
Rafal Krypa [Mon, 13 Mar 2017 15:42:35 +0000 (16:42 +0100)]
Adjust test security_manager_09_app_install_constraint_check

Adapt to new change in security-manager that allows platform version
for an app to be changed during app upgrade.

Change-Id: I1f7dfa4602c1561e76ced32870a2c0ea7f20d090
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
7 years agoFix app_defined_05_global_local_install 91/118091/1
Dariusz Michaluk [Fri, 3 Mar 2017 14:21:12 +0000 (15:21 +0100)]
Fix app_defined_05_global_local_install

MANIFESTS bucket split to MANIFESTS_GLOBAL & MANIFESTS_LOCAL

Change-Id: I21badf1f5b6a614ba81cc4484e2eb0ae092cc50f

7 years agoAdjust security_manager_20_user_cynara_policy 90/118090/1
Dariusz Michaluk [Fri, 3 Mar 2017 14:16:49 +0000 (15:16 +0100)]
Adjust security_manager_20_user_cynara_policy

MANIFESTS bucket split to MANIFESTS_GLOBAL & MANIFESTS_LOCAL

Change-Id: Ice44dac4cbb00d9194074e6b32df78abdc3fba31

7 years agoAdd test for global/local app defined privileges 86/116486/1
Dariusz Michaluk [Fri, 24 Feb 2017 10:56:45 +0000 (11:56 +0100)]
Add test for global/local app defined privileges

Change-Id: Ia9aae496fc5a23ec636c5746bbf1c872efe78c1b

7 years agoAdd test for app defined privileges update 20/116320/3
Dariusz Michaluk [Thu, 23 Feb 2017 14:17:01 +0000 (15:17 +0100)]
Add test for app defined privileges update

Change-Id: I4bc9402b33836a1d5394764a4ff8474902f2324c

7 years agoRemove duplicated code 21/116321/1
Bartlomiej Grzelewski [Thu, 23 Feb 2017 16:04:26 +0000 (17:04 +0100)]
Remove duplicated code

Change-Id: Id4512340f874a84181af3703866f7a16a3f06bce

7 years agoAdd test for cynara policy database remove 73/116273/1
Dariusz Michaluk [Thu, 23 Feb 2017 12:28:54 +0000 (13:28 +0100)]
Add test for cynara policy database remove

Change-Id: I47688bf973b7288d1901d9c820942dd4c2ff1b91

7 years agoAdd test for cynara policy database update 62/115862/1
Bartlomiej Grzelewski [Tue, 21 Feb 2017 15:33:59 +0000 (16:33 +0100)]
Add test for cynara policy database update

Change-Id: Ibc424e56cf2be97a927334a2d7d5c2214534103d

7 years agoRework Application Defined Privileges support and tests 92/115592/3
Dariusz Michaluk [Mon, 20 Feb 2017 11:19:41 +0000 (12:19 +0100)]
Rework Application Defined Privileges support and tests

Change-Id: I629bab91e4f04076bad9ec300943c6e83ba9ba6c

7 years agoAdd tests for application defined privileges 41/113741/5
Bartlomiej Grzelewski [Fri, 3 Feb 2017 15:49:29 +0000 (16:49 +0100)]
Add tests for application defined privileges

Change-Id: Idbceecaabab13449089006b086e95655d822257b

7 years agoAdd support for Application Defined Privileges 40/113740/4
Bartlomiej Grzelewski [Fri, 3 Feb 2017 15:48:45 +0000 (16:48 +0100)]
Add support for Application Defined Privileges

Change-Id: I51122a50ac1b6f0c169659c07fcc9da02bd3ef36

7 years agoFix 19b_privacy_manager_privacy_related_privileges_policy_no_hybrid 77/111477/1
Dariusz Michaluk [Fri, 20 Jan 2017 11:37:00 +0000 (12:37 +0100)]
Fix 19b_privacy_manager_privacy_related_privileges_policy_no_hybrid

Change-Id: I5626fe383db3b8b03c8e9d1446d425f32d895d9e

7 years agoRevert "SM : disabled ask-user policy tests" 59/111459/1
Dariusz Michaluk [Fri, 20 Jan 2017 10:23:15 +0000 (11:23 +0100)]
Revert "SM : disabled ask-user policy tests"

This reverts commit 6b76ab97e7e6bd8ba9d1f8fb2fc34f2a667fe0ff.

Change-Id: Ib211ab51d9c03affd0f939330cfad12f7d21ed55

7 years agoAdjust test 25g_local_user_set_install_type_local 46/111146/1
Dariusz Michaluk [Thu, 19 Jan 2017 14:45:02 +0000 (15:45 +0100)]
Adjust test 25g_local_user_set_install_type_local

Change privacy privilege type to normal.

Change-Id: I266e99e7f8c0fc835f080a426abf6e680ac56f03

7 years agoAdjust test 01c_app_uninstall_wrong_pkg_id 85/109785/2
Krzysztof Jackiewicz [Wed, 11 Jan 2017 14:11:50 +0000 (15:11 +0100)]
Adjust test 01c_app_uninstall_wrong_pkg_id

Pkg id is no longer ignored during app uninstallation. Test updated.

Change-Id: I120a98219dcfe099047a6e36acc7b3aecf92f1ca

7 years agoSM: TestSecurityManagerDatabase class removed 57/105157/3
Lukasz Pawelczyk [Tue, 27 Dec 2016 12:01:29 +0000 (21:01 +0900)]
SM: TestSecurityManagerDatabase class removed

- most checks implemented using security_manager_get_app_pkgid()
- checks whether package has been removed after app uninstall removed
- privileges test in security_manager_02_app_install_uninstall_full
  implemented using policy privileges (no need to inject priv:group)
- get_author_id() function has no counterpart currently
- some changes in the PolicyConfiguration class to add functionality
  required by the tests now

Change-Id: I6c5d4b308ad43bac71794b3a082c75ee76dbee13

7 years agoFix thread credential synchronization tests 63/108063/1
Rafal Krypa [Mon, 2 Jan 2017 13:03:37 +0000 (14:03 +0100)]
Fix thread credential synchronization tests

Tests in SECURITY_MANAGER_PREPARE_APP group consisted of 3 dependant
test cases: prepare, actual test and cleanup.
Now they are merged into single test case that doesn't depend on any
preparations done by other test cases.

Change-Id: I734a7c992b4edb32e7db2f7581c501daed3c4929
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
7 years agoThread credential synchronization tests 66/87266/13
Krzysztof Jackiewicz [Mon, 5 Sep 2016 11:55:22 +0000 (13:55 +0200)]
Thread credential synchronization tests

Change-Id: I0ccaf029e0ddf75bdd12355bfc440e660b89ff37

7 years agoRemove proper install directory in ~AppInstalHelper 62/104462/1
Krzysztof Jackiewicz [Tue, 13 Dec 2016 10:10:05 +0000 (11:10 +0100)]
Remove proper install directory in ~AppInstalHelper

Until now the destructor of AppInstallHelper was trying to remove m_installDir
which is a directory above actual application installation dir. Removal didn't
succeed if directory was not empty.

Change-Id: I51e5b41eb911d67b7d0c11f5ab3f74d60b759ca0

7 years agoSM : Cleanup - trusted sharing test cases 92/95792/3
Zofia Abramowska [Fri, 4 Nov 2016 16:11:41 +0000 (17:11 +0100)]
SM : Cleanup - trusted sharing test cases

Change-Id: I3114a2e711b2d73d5fcc34a8a86a690098388b00

7 years agoSM : Cleanup - private sharing test cases 07/94407/6
Zofia Abramowska [Thu, 27 Oct 2016 12:39:02 +0000 (14:39 +0200)]
SM : Cleanup - private sharing test cases

* Rename getSharedPath and createSharedFile in AppInstallHelper
  to getPrivateFile and createPrivateFile (path is installed as simple
  private RW path)
* Move runAccessTest to SM test commons
* Add runAccessTest for non applications
* Change smack access checks to access checks done in proper context

Change-Id: I11a96be86ce323e21709e9d59de0042e2966d899

7 years agoSM : Cleanup - public sharing test cases 72/94172/6
Zofia Abramowska [Fri, 21 Oct 2016 15:06:39 +0000 (17:06 +0200)]
SM : Cleanup - public sharing test cases

* Add private and sharedRO dir creation with number to
  AppInstallHelper
* Remove getAIH from ScopedInstaller
* Fix getInstallType constness

Change-Id: Ia1ed3ff34d3d5768428adc9a52a046025cff0ae4

7 years agoSM: Shm prefrormance test 21/92021/4
Bartlomiej Grzelewski [Wed, 12 Oct 2016 16:53:55 +0000 (18:53 +0200)]
SM: Shm prefrormance test

Change-Id: I79a6a1e2873beae44d8b8d0331d9fa791d69f53a

7 years agoSM: Test of security_manager_shm_open wrapper. 73/87573/5
Bartlomiej Grzelewski [Wed, 7 Sep 2016 11:36:42 +0000 (13:36 +0200)]
SM: Test of security_manager_shm_open wrapper.

Change-Id: Idf0320067d8815438cb019df4d5caacd04fe2843

7 years agoSM : AppInstallHelper create install dir automatically 71/94171/6
Zofia Abramowska [Fri, 21 Oct 2016 15:09:51 +0000 (17:09 +0200)]
SM : AppInstallHelper create install dir automatically

AppInstallHelper creates install dir when creation
of any other type of file/path is requested, so this
doesn't have to be done manually.

Change-Id: I0b9e80b737296c3a7e9d9bbfcdfc05ed4fd8b000

7 years agoSM : Cleanup common functions 93/93093/6
Zofia Abramowska [Fri, 21 Oct 2016 14:42:52 +0000 (16:42 +0200)]
SM : Cleanup common functions

Remove unused variables and functions.

Change-Id: I64e69b261817a575e6e5fa79df22a2e000da0611

7 years agoSM : Cleanup - privacy manager test cases 27/93327/7
Zofia Abramowska [Fri, 21 Oct 2016 14:42:52 +0000 (16:42 +0200)]
SM : Cleanup - privacy manager test cases

Added required by new version of test cases:
* Move constructor of AppInstallHelper
* Move constructor of ScopedInstaller
* Move constructor of TemporaryTestUser
* Remove passing isHybrid to AppInstallHelper constructor

Change-Id: If5da564bc799f74d897e66eb3e313e13e43a8563

7 years agoSM : Cleanup - dyntransition test cases 92/93092/8
Zofia Abramowska [Wed, 12 Oct 2016 16:46:58 +0000 (18:46 +0200)]
SM : Cleanup - dyntransition test cases

Change-Id: I65d4c5502ca4e0f5352d11984b1b45b513254bdf

7 years agoSM : Cleanup - register paths test cases 91/93091/7
Zofia Abramowska [Wed, 12 Oct 2016 10:42:08 +0000 (12:42 +0200)]
SM : Cleanup - register paths test cases

Change-Id: I2c23203f58fc8623ada7cee240a79617e555713f

7 years agoSM : Add generatePathTrustedLabel 90/93090/6
Zofia Abramowska [Wed, 12 Oct 2016 14:05:20 +0000 (16:05 +0200)]
SM : Add generatePathTrustedLabel

Change-Id: Iaa07ba291d6962d82ec89ea9c9797bc443de0fab

7 years agoSM : Fix ScopedInstaller - use request uid in destructor 89/93089/6
Zofia Abramowska [Fri, 14 Oct 2016 13:09:22 +0000 (15:09 +0200)]
SM : Fix ScopedInstaller - use request uid in destructor

Change-Id: Ifa6a21d8db5390c2fa64f6d3c4b6b81098d5c767

7 years agoSM : AppInstallHelper, ScopedInstaller, TempTestuser fork safe 88/93088/6
Zofia Abramowska [Thu, 13 Oct 2016 17:56:13 +0000 (19:56 +0200)]
SM : AppInstallHelper, ScopedInstaller, TempTestuser fork safe

* Adjust simple test cases

Change-Id: Icc9fe4d34a32ac4c7399bdc062d42aa0f9662b52

7 years agoSM : Don't add version by default in app install 87/93087/6
Zofia Abramowska [Wed, 12 Oct 2016 12:47:22 +0000 (14:47 +0200)]
SM : Don't add version by default in app install

Change-Id: Id460dbb9b5216ba4472a498c7ea5317084b06bc2

7 years agoSM : Cleanup - simple test cases 18/91818/12
Zofia Abramowska [Tue, 4 Oct 2016 15:13:02 +0000 (17:13 +0200)]
SM : Cleanup - simple test cases

Change-Id: Ia96f74c14eb772c34ec084f58fbe9f7845fc7576

7 years agoMerge branch 'tizen' into security-manager 50/96650/1
Zbigniew Jasinski [Wed, 9 Nov 2016 13:45:57 +0000 (14:45 +0100)]
Merge branch 'tizen' into security-manager

Change-Id: I23e008f66b45d24fe594edcd18c5ca4b077791a4
Signed-off-by: Zbigniew Jasinski <z.jasinski@samsung.com>
7 years agoSM : disabled ask-user policy tests 80/93080/5
Tomasz Swierczek [Thu, 20 Oct 2016 08:37:26 +0000 (10:37 +0200)]
SM : disabled ask-user policy tests

The #define in CMakeLists.txt needs to be commented just like it is
in Security-Manager module.

Change-Id: Ib1cf5347144334ec5ae953e0669c3fa4310960d7

7 years agoSM : added ASKUSER policy test cases to privacy_manager test suite 65/90465/8
Tomasz Swierczek [Mon, 17 Oct 2016 08:12:03 +0000 (10:12 +0200)]
SM : added ASKUSER policy test cases to privacy_manager test suite

Change-Id: I8a2c2e430c25e52880847ca3351042754f4871e8

7 years agoSM : extended installation helpers to support hybrid flag 70/93070/8
Tomasz Swierczek [Mon, 17 Oct 2016 08:10:48 +0000 (10:10 +0200)]
SM : extended installation helpers to support hybrid flag

ScopedInstaller class and AppInstallHelper class needed relevant support to fully
configure temporary application installation. Cynara admin class extended with
support to retrieve policy types from descriptions.

Change-Id: Ic0808cd911f97151338d515f37b8995abba561c6

7 years agoSM : PolicyConfiguration add getGroup 78/91678/3
Zofia Abramowska [Mon, 10 Oct 2016 14:34:56 +0000 (16:34 +0200)]
SM : PolicyConfiguration add getGroup

Change-Id: I714720fa263a13325b09f3e4b98678c6d061e1df

7 years agoSM : Add MessagePipe 77/91677/3
Zofia Abramowska [Mon, 10 Oct 2016 14:09:07 +0000 (16:09 +0200)]
SM : Add MessagePipe

Change-Id: I720056bc27c837914ed56ee36bca1512093ac4a9

7 years agoSM : Enhance ScopedInstaller 76/91676/3
Zofia Abramowska [Mon, 10 Oct 2016 10:58:04 +0000 (12:58 +0200)]
SM : Enhance ScopedInstaller

 * Add requestUid parameter to test without explicitly
   given uid
 * Add guard for uninstalling

Change-Id: I8b5fee86094cd4ad062643a8441f114809be2584

7 years agoSM : Set offline default value for TemporaryTestUser constructor 75/91675/3
Zofia Abramowska [Mon, 10 Oct 2016 10:57:32 +0000 (12:57 +0200)]
SM : Set offline default value for TemporaryTestUser constructor

Change-Id: Ib79c90baa50b11b012c9811ef306aabb70576e85

7 years agoSM : Add generating label for shared RO paths 74/91674/3
Zofia Abramowska [Thu, 6 Oct 2016 13:01:33 +0000 (15:01 +0200)]
SM : Add generating label for shared RO paths

Change-Id: I03596143f11e733e7c7bfca9b167ccc475e2c426

7 years agoSM : Add transmute and exec params to check_path 73/91673/3
Zofia Abramowska [Thu, 6 Oct 2016 12:12:45 +0000 (14:12 +0200)]
SM : Add transmute and exec params to check_path

Change-Id: Ie779b3e36bc815cd2c2dc46b0c9cd0ab50be9428

7 years agoSM : Normalize TemporaryTestUser getUidString method 72/91672/3
Zofia Abramowska [Mon, 10 Oct 2016 11:05:22 +0000 (13:05 +0200)]
SM : Normalize TemporaryTestUser getUidString method

Change-Id: I0a2640fa40f34070de92dfaeed5223c89bcd8d49

7 years agoSM : Use std::string instead of const char * 38/89038/5
Zofia Abramowska [Wed, 21 Sep 2016 14:31:51 +0000 (16:31 +0200)]
SM : Use std::string instead of const char *

Change-Id: I11fb526667e03192331d93d4352f9383e025987c

7 years agoSM : Propagate isHybrid flag in checks 37/89037/4
Zofia Abramowska [Tue, 20 Sep 2016 17:36:27 +0000 (19:36 +0200)]
SM : Propagate isHybrid flag in checks

Change-Id: I1bd8a40abcd0bc19821827e170c1fd3c7d2d89a4

7 years agoSM : Enhance AppInstallHelper 36/89036/4
Zofia Abramowska [Tue, 20 Sep 2016 17:36:17 +0000 (19:36 +0200)]
SM : Enhance AppInstallHelper

* Split into header and source file
* Fix constructors
* Change default uid
* Add creating public dir
* Add privileges
* Add install type
* Add author

Change-Id: I1797c64c6cacd9ba4b52169b03b338d388e2a004

7 years agoSM : Adjust tests for unification of smack accesses to application 31/91931/1
Mateusz Forc [Wed, 12 Oct 2016 07:39:15 +0000 (09:39 +0200)]
SM : Adjust tests for unification of smack accesses to application

Change-Id: I0d758dc49badb6a7ce47245beabc80f5604baff9

7 years agoSM: Adjust creds tests to nonhybrid apps 73/88273/4
Zofia Abramowska [Thu, 15 Sep 2016 13:43:09 +0000 (15:43 +0200)]
SM: Adjust creds tests to nonhybrid apps

Change-Id: Ib91793dc8dc7a1cc5659f8e38182929b45e465be

7 years agoSM: Adjust trusted sharing tests to nonhybrid apps 72/88272/4
Zofia Abramowska [Thu, 15 Sep 2016 13:14:15 +0000 (15:14 +0200)]
SM: Adjust trusted sharing tests to nonhybrid apps

Change-Id: If39ea63f87150a49285e4b4f5b044f193e72eeab

7 years agoSM: Change process label generation 96/87596/4
Zofia Abramowska [Thu, 8 Sep 2016 17:57:46 +0000 (19:57 +0200)]
SM: Change process label generation

Change-Id: I36365303a07ef94e0a62a16fa0adf6824ca6c8c5

7 years agoSM: Add identify app from cynara client tests 52/88552/2
Zofia Abramowska [Fri, 16 Sep 2016 10:11:10 +0000 (12:11 +0200)]
SM: Add identify app from cynara client tests

Change-Id: Ia1a167d3efdf851dea9de317dd428f50c68e46b7

7 years agoSM : Adjust tests for new shared RO support 22/88522/7
Mateusz Forc [Mon, 19 Sep 2016 10:58:17 +0000 (12:58 +0200)]
SM : Adjust tests for new shared RO support

SharedRO accesses now are applied to all applications,
not only tizen 2.X ones

Change-Id: Ibe65bab965476c70865011bcb7648561a6688a2e

7 years agoSM : Add ScopedInstaller and ScopedPathRemover classes 21/88521/6
Mateusz Forc [Mon, 19 Sep 2016 10:57:26 +0000 (12:57 +0200)]
SM : Add ScopedInstaller and ScopedPathRemover classes

Classes enable proper app installation per test
and sharedRO path cleanup for multiple apps in one package

Change-Id: Ib33d2e6e45b78a3841e88e8d7046231e6b2ba93c

7 years agoSM : Modify AppInstallHelper class 20/88520/6
Mateusz Forc [Mon, 19 Sep 2016 10:56:54 +0000 (12:56 +0200)]
SM : Modify AppInstallHelper class

* Add local installation
* Change vector of dirs to map (path,pathType)
* Add support of user UID,GID
* Fix sharedRO path cleanup
Change-Id: I4d34162fa237d4037a21a3b999e56977961f9a16

7 years agoSM: Add tests for NSS plugin 28/86328/9
Bartlomiej Grzelewski [Fri, 2 Sep 2016 13:17:44 +0000 (15:17 +0200)]
SM: Add tests for NSS plugin

Change-Id: I7e3e387869efdb2cad1c868aa3ab4c12dc09c815

7 years agoUse gum-utils instead of shadow-utils for making security_test_user 85/88785/1
Rafal Krypa [Tue, 20 Sep 2016 09:11:58 +0000 (11:11 +0200)]
Use gum-utils instead of shadow-utils for making security_test_user

Using plain useradd or userdel in %post scripts causes wrong label on
/etc/passwd and /etc/group files. The reason for that is that the user
manipulation tools from shadow-utils bakcup the old file in /etc/ and
create a new edited one instead of modifying it in-place.
This results in files in /etc created with Smack label of the process
that added or removed the user.

Change-Id: Id523dcd25d1434dbe2847db915d5b4f630b3861a

7 years agoMerge branch 'tizen' into security-manager 66/88366/1
Zbigniew Jasinski [Fri, 16 Sep 2016 12:13:07 +0000 (14:13 +0200)]
Merge branch 'tizen' into security-manager

Signed-off-by: Zbigniew Jasinski <z.jasinski@samsung.com>
Conflicts:
src/common/tests_common.cpp
src/common/tests_common.h

Change-Id: Ic2301d3414aad2be4488eb04c59e217e184037ca