platform/core/security/vasum.git
9 years agoFix ut threading, ut refactor 44/34344/1
Piotr Bartosiewicz [Fri, 23 Jan 2015 15:32:02 +0000 (16:32 +0100)]
Fix ut threading, ut refactor

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, run tests

Change-Id: I9eca161ee3752f29611395dccc73e9ba8e614e6d

9 years agoIPC: Support older glib 74/34274/6
Jan Olszak [Tue, 20 Jan 2015 15:15:39 +0000 (16:15 +0100)]
IPC: Support older glib

[Bug/Feature]  Replaced new calls with older equivalents
               Fixed SIGSEGV bug
[Cause]        N/A
[Solution]     N/A
[Verification] Build, install, run tests, run tests under valgrind

Change-Id: I572321fb4055f8f5b033b755c883c3e4b00bfcda

9 years agoProvisioning uses dynamic configuration 59/34259/3
Piotr Bartosiewicz [Thu, 22 Jan 2015 08:34:38 +0000 (09:34 +0100)]
Provisioning uses dynamic configuration

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, run tests

Change-Id: If1762b8d0993a98048d2f9310981c53f2a913124

9 years agoFix LxcZoneSuite/StartStopTest 62/34262/1
Piotr Bartosiewicz [Thu, 22 Jan 2015 11:51:04 +0000 (12:51 +0100)]
Fix LxcZoneSuite/StartStopTest

[Bug/Feature]   Test was failing
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, run tests

Change-Id: Ia87dbd173cfe58f216adac1141a15d854e91159c

9 years agoImprove config tests 40/33440/3
Piotr Bartosiewicz [Fri, 9 Jan 2015 14:13:36 +0000 (15:13 +0100)]
Improve config tests

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I6fc7974d3379d4a96aa712e3e00b8798e6d90181

9 years agoSome synchronizations 36/34136/4
Mateusz Malicki [Wed, 21 Jan 2015 11:53:38 +0000 (12:53 +0100)]
Some synchronizations

[Bug/Feature]   Segfault may happen
[Cause]         Access to expired memory (stack), unset memory or data races
[Solution]      Synchronizations
[Verification]  Run tests in slow machine

Change-Id: Iebf1a3d7dc93341d4200f6380c0110ecd2d96075

9 years agoAdd ValueLatch interface and use it in IPC tests 71/33671/10
Lukasz Kostyra [Tue, 13 Jan 2015 10:13:44 +0000 (11:13 +0100)]
Add ValueLatch interface and use it in IPC tests

[Feature]       New ValueLatch interface.
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I90e4f7523f57b2f5cb8543e932e0fadffff5b824

9 years agoFix: Abort tests on timeout 04/34004/4
Mateusz Malicki [Mon, 19 Jan 2015 14:59:23 +0000 (15:59 +0100)]
Fix: Abort tests on timeout

[Bug/Feature]   Abort testing if timeout was exceeded
[Cause]         Access to expired memory (stack) or unset memory
[Solution]      Move shared data on heap or change expiring order
[Verification]  Run tests (IPCSuite) in slow machine

Change-Id: Ib2621d1700cd7c53f9d0dfa29e4b603006525a81

9 years agoIPC: Single request queue 22/33922/8
Jan Olszak [Thu, 15 Jan 2015 15:37:06 +0000 (16:37 +0100)]
IPC: Single request queue

[Bug/Feature]  Single queue for passing data between threads
               Prefixes in loggs inside Processor
               Destructor always waits till Processor ends
[Cause]        N/A
[Solution]     N/A
[Verification] Build, install, run tests, run tests under valgrind

Change-Id: Idc31496559b46e836528843dfc411cbdeaf259e0

9 years agoAdd prefix to config db 24/33924/1
Piotr Bartosiewicz [Fri, 16 Jan 2015 14:00:40 +0000 (15:00 +0100)]
Add prefix to config db

[Bug/Feature]   Added prefix to config db. Adjusted to libConfig
                changes.
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, run tests

Change-Id: Ie2cbf4cd4c8b4ef6225b5a2bfa740e5f61129fcc

9 years agoPrevent from call method on partially destroyed object 56/33856/2
Mateusz Malicki [Thu, 15 Jan 2015 15:20:12 +0000 (16:20 +0100)]
Prevent from call method on partially destroyed object

[Bug]           startAsync can cause call method on partially destroyed object
[Cause]         async call are processed while ZoneManager is being destroyed
[Solution]      Ensure that all async calls was ended
[Verification]  Set EVENT_TIMEOUT=5 (ut-zones-manager.cpp), build, install,
                run ZonesManagerSuite/StartShutdownZoneTest with 1000
                times less speed.

Change-Id: I00bc8c0926be8a9a62ec23b81f62a2827db4799b

9 years agoFix persistence of dynamically created zones 30/33630/6
Piotr Bartosiewicz [Tue, 13 Jan 2015 10:25:52 +0000 (11:25 +0100)]
Fix persistence of dynamically created zones

[Bug]           No zones after daemon restart
[Cause]         N/A
[Solution]      Use database to store dynamic config
[Verification]  1) run tests
                2) - run daemon
                   - create new zone
                   - restart daemon, verify zone is working
                   - destroy that zone
                   - restart daemon, verify zone is gone

Change-Id: I43f3e2f4f2d9c897d20b52db812dd837c90ef155

9 years agoUnallocate provisioned resources in destructor 61/33761/5
Mateusz Malicki [Wed, 14 Jan 2015 09:18:14 +0000 (10:18 +0100)]
Unallocate provisioned resources in destructor

[Bug/Feature]   Provisioned resources aren't released when "zone->start" throws exception.
[Cause]         There is no destructor in ZoneProvsion class
[Solution]      Destructor was implemented
[Verification]  Build, install, run ZoneProvsionSuite tests

Change-Id: I4d610cae7b1ffee4fd3b06f2906b9e4631a1dcf7

9 years agoFix: Drop exception thrown from async callback 79/33779/3
Mateusz Malicki [Wed, 14 Jan 2015 14:28:01 +0000 (15:28 +0100)]
Fix: Drop exception thrown from async callback

[Bug/Feature]   Crash when exception are thrown from async callback
[Cause]         Exception from async callback
[Solution]      Drop exception
[Verification]  Build, install, run test on slp

Change-Id: I00fad962beb488508d25a21a68ee7e487f317ba0

9 years agoIPC: Single state mutex in Processor 55/33755/4
Jan Olszak [Fri, 9 Jan 2015 12:48:05 +0000 (13:48 +0100)]
IPC: Single state mutex in Processor

[Bug/Feature]  Fixed a bug in callSync.
               Replaced all mutexes in Processor with only one.
               Added LOGS loggs
[Cause]        N/A
[Solution]     N/A
[Verification] Build, install, run tests, run tests under valgrind

Change-Id: I6b6ec26df5f5d7ba8b930e4321f766146fa556f0

9 years agoFix: Crash when testing ut-zones-manager 72/33672/1
Mateusz Malicki [Tue, 13 Jan 2015 14:36:23 +0000 (15:36 +0100)]
Fix: Crash when testing ut-zones-manager

[Bug/Feature]   Crash when testing ut-zones-manager
[Cause]         BOOST_CHECK is not thread safe
[Solution]      BOOSR_CHECK was removed from child thread
[Verification]  Build, install, run test on slp

Change-Id: I6cb10f626d8e5ec908e359de15b3fbbed9abb77c

9 years agoAdd get_zone_ids, get_active_zone_id and get_zones_status to cli 70/33270/7
Mateusz Malicki [Wed, 7 Jan 2015 13:29:30 +0000 (14:29 +0100)]
Add get_zone_ids, get_active_zone_id and get_zones_status to cli

[Feature]       Add get_zone_ids, get_active_zone_id and get_zones_status to cli
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, run appropriate functions (through cli)

Change-Id: If6823243d66606d28bf6b45c5b2ece8ab7c06e49

9 years agoAdded testing wrong or unset union type 21/33521/2
Mateusz Malicki [Mon, 12 Jan 2015 15:16:47 +0000 (16:16 +0100)]
Added testing wrong or unset union type

[Bug/Feature]   Added testing wrong or unset union type
[Cause]         N/A
[Solution]      Throw ConfigException
[Verification]  Build, install, run ConfigurationSuite tests

Change-Id: I813b52870c4c12a58a9a614821056278a5445a68

9 years agoAdd test for LoggerScope 17/33517/2
Lukasz Kostyra [Wed, 17 Dec 2014 09:42:41 +0000 (10:42 +0100)]
Add test for LoggerScope

[Feature]       Test for new LoggerScope interface.
[Cause]         New interface in libLogger.
[Solution]      Test for new LoggerScope interface.
[Verification]  Build, install, run Log tests.

Change-Id: I43767c1f65d09ca8304046fd9d8586f1077a8b63

9 years agoIPC: Convert test synchronization method to Latch 73/33373/3
Lukasz Kostyra [Wed, 7 Jan 2015 14:39:02 +0000 (15:39 +0100)]
IPC: Convert test synchronization method to Latch

[Bug/Feature]   Some tests were using sleep_for in order to synchronize threads
[Cause]         N/A
[Solution]      Use Latch instead of atomic_bool set and sleep_for to
                synchronize threads in tests
[Verification]  Build, install, run tests. Should pass as they did before.

Change-Id: I3067ed1f13cdde047f720c0b6d05ce19ec156dbe

9 years agoFixed generation of log_sink file 33/33433/2
Mateusz Malicki [Fri, 9 Jan 2015 11:34:12 +0000 (12:34 +0100)]
Fixed generation of log_sink file

[Bug]i          log_sink file is invalid formated xml
[Cause]         Lxc invoke exit(0) after fork. Exit from child and
                from parent cause redundant log write
[Solution]      Add defintion to CMakeLists.txt
[Verification]  Build, install, build run test with '--log_sink=/tmp/log.xml',
                run 'xmllint --huge --format /tmp/log.xml' (there should
                be no parse errors).
                Note: StartHasStoppedTest can fail.

Change-Id: I9a1d4bee9030eb8e3958ff914ef7cf2dc1a953ce

9 years agoIPC: Cleaned up timeouts in tests 23/33423/4
Jan Olszak [Fri, 9 Jan 2015 09:11:28 +0000 (10:11 +0100)]
IPC: Cleaned up timeouts in tests

[Bug/Feature]  N/A
[Cause]        N/A
[Solution]     N/A
[Verification] Build, install, run tests, run tests under valgrind

Change-Id: Ifee2dffed77a5686fdb2165b2a530f39aef0857a

9 years agoAdd correct button configuration 39/33339/1
Dariusz Michaluk [Thu, 8 Jan 2015 10:12:25 +0000 (11:12 +0100)]
Add correct button configuration

[Bug/Feature]   Add correct button configuration
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests, launch vasum

Change-Id: I3561823663c3dd9a058249a0467fa704105f19a1
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
9 years agoUpdate tizen common (with wayland) lxc template 49/32949/3
Dariusz Michaluk [Tue, 30 Dec 2014 13:46:59 +0000 (14:46 +0100)]
Update tizen common (with wayland) lxc template

[Bug/Feature]   Adjust template to new platform image
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: Ic32677fa85a73249af5f1d84b63893b26d1eadd4
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
9 years agoIPC: Fixed DisconnectedPeerError test 79/33279/1
Jan Olszak [Wed, 7 Jan 2015 15:02:54 +0000 (16:02 +0100)]
IPC: Fixed DisconnectedPeerError test

[Bug/Feature]  N/A
[Cause]        SERIALIZATION_ERROR may also be returned when peer disconnects
[Solution]     N/A
[Verification] Build, install, run tests

Change-Id: Ifaf67828796cfa0def8d5f56dc926314abb2d36b

9 years agoIPC: External polling loop with a Client 52/32052/12
Jan Olszak [Tue, 16 Dec 2014 13:09:33 +0000 (14:09 +0100)]
IPC: External polling loop with a Client

[Bug/Feature]  Using GMainLoop with a Client is possible.
               Fixed some buggs
[Cause]        N/A
[Solution]     N/A
[Verification] Build, install, run tests

Change-Id: Iab3350b400739bb951d84e0d6b7de15d0cccf1d3

9 years agoSmall code cleanup 89/32989/2
Piotr Bartosiewicz [Wed, 31 Dec 2014 12:28:54 +0000 (13:28 +0100)]
Small code cleanup

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Run tests

Change-Id: I45d18c987c7ea90276a3cf6e1eac3760a9df1db7

9 years agoDebug utility class: SameThreadGuard 73/32673/2
Piotr Bartosiewicz [Mon, 22 Dec 2014 11:01:20 +0000 (12:01 +0100)]
Debug utility class: SameThreadGuard

[Bug/Feature]   A utility for checking the code against invalid assumes
                about synchronization needs.
[Cause]         N/A
[Solution]      N/A
[Verification]  Run tests

Change-Id: I880f9c334d8d461e2472052db5244d9f5eab1bb8

9 years agoFix creating zone when USE_EXEC is defined 66/32766/1
Piotr Bartosiewicz [Tue, 23 Dec 2014 15:30:14 +0000 (16:30 +0100)]
Fix creating zone when USE_EXEC is defined

[Bug/Feature]   Broken zone creation using lxc-create
[Cause]         N/A
[Solution]      N/A
[Verification]  Compile with -DUSE_EXEC, sun server and create zone

Change-Id: I164ea2ea17e93e4e22e7b74d2f8539484cedea2f

9 years agoImplement grant and revoke device 11/32611/5
Piotr Bartosiewicz [Fri, 19 Dec 2014 13:56:56 +0000 (14:56 +0100)]
Implement grant and revoke device

[Bug/Feature]   Was not implemented
[Cause]         N/A
[Solution]      N/A
[Verification]  Run tests, run grant/revoke device cli commands

Change-Id: I4cfa67d99cb45d4747cfd780776bc2340c5f4535

9 years agoImplement shutdown/start function in server, client and cli 69/32669/2
Dariusz Michaluk [Thu, 18 Dec 2014 08:56:02 +0000 (09:56 +0100)]
Implement shutdown/start function in server, client and cli

[Bug/Feature]   Implement shutdown/start function in server, client and cli
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, run appropriate function (through cli)

Change-Id: Ib06feff13305db134cf3415c38e83d0e836f149a
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
9 years agoconfig (dynamic): unit tests, test config extracted 10/31710/13
Krzysztof Dynowski [Sat, 6 Dec 2014 12:05:46 +0000 (13:05 +0100)]
config (dynamic): unit tests, test config extracted

[Bug/Feature]   test loading config defaults from json
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: Ia9ad29af5e343642d9ca7ae26b126c3efe45beab

9 years agoTaking into account the provision configuration 07/31207/12
Mateusz Malicki [Tue, 9 Dec 2014 14:56:40 +0000 (15:56 +0100)]
Taking into account the provision configuration

[Feature]      Taking into account the provision configuration
[Cause]        N/A
[Solution]     N/A
[Verification] Build, install, run tests

Change-Id: I2b564bb3f9af2514781ff2233cabb7b1ca654e69

9 years agoRearrange create zone process 92/32392/3
Dariusz Michaluk [Wed, 17 Dec 2014 14:46:59 +0000 (15:46 +0100)]
Rearrange create zone process

[Bug/Feature]   Remove start functionality, add VT support.
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I67a7eebf6e45bb2cab29e833fbf53c1bdaeb88fb
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
9 years agoFix synchronization issues 73/32373/2
Piotr Bartosiewicz [Wed, 17 Dec 2014 12:41:13 +0000 (13:41 +0100)]
Fix synchronization issues

[Bug/Feature]   Missing mutex
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: Iec7e016b62a0f3a671fd4843957e1bc6a265f84e

9 years agoSome cppcheck fixes 53/32153/2
Mateusz Malicki [Tue, 16 Dec 2014 10:40:03 +0000 (11:40 +0100)]
Some cppcheck fixes

[Bug]           Some cppcheck fixes (const, uniused variable)
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run cppcheck

Change-Id: I58fa2e3434c6a7546441ba310bb437b59c7fd6de

9 years agoUpdate tizen common (with wayland) lxc template 85/32085/7
Dariusz Michaluk [Mon, 15 Dec 2014 11:55:16 +0000 (12:55 +0100)]
Update tizen common (with wayland) lxc template

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: Ib7621c70a708fea479dc0d2e7d4bbc528728c504
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
9 years agoChange zonesPath and ExecStart command in service 84/32084/7
Dariusz Michaluk [Mon, 15 Dec 2014 12:13:52 +0000 (13:13 +0100)]
Change zonesPath and ExecStart command in service

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: Ie51e3bd436f039f926c93b92ea5343e27e7314c0
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
9 years agoAdding support for --vt option in lxc-templates 83/32083/4
Dariusz Michaluk [Mon, 15 Dec 2014 11:36:25 +0000 (12:36 +0100)]
Adding support for --vt option in lxc-templates

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I11049b06922f763e168449d43cf6dd9527ea9324
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
9 years agoWorker thread utility class 91/31891/7
Piotr Bartosiewicz [Thu, 11 Dec 2014 16:54:13 +0000 (17:54 +0100)]
Worker thread utility class

[Bug/Feature]   A utility class that wraps a queue of tasks executed in a
                dedicated thread.
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I32788fd6321c2877cf4dafe7213c1a140c1d3fd2

9 years agoAdd "enabled" file 96/32096/3
Lukasz Kostyra [Mon, 15 Dec 2014 12:25:23 +0000 (13:25 +0100)]
Add "enabled" file

[Feature]       File indicating that zones are running in the system.
[Cause]         Other external services (eg. security-manager) must know when
                zones are active in the system.
[Solution]      Provide "enabled" file, which will appear when zones are
                launched. The file will appear when first zone will be created,
                and file will disappear when last zone will be destroyed.
[Verification]  Build, install, run tests.

Change-Id: I634e424e28c7d449276bbe1c2c80f3cb0e35bcb7

9 years agoIPC: Support for the external polling loop in Service 57/31957/9
Jan Olszak [Mon, 8 Dec 2014 15:48:21 +0000 (16:48 +0100)]
IPC: Support for the external polling loop in Service

[Bug/Feature]   Using GMainLoop is possible
[Cause]         N/A
[Solution]      For glib > v.2.36
[Verification]  Build, install, run tests

Change-Id: Ic6d74688c322dd79b29195d94658a4f2ffe0aa83

9 years agoFix build error ('out' may be used uninitialized) 01/32101/2
Dariusz Michaluk [Mon, 15 Dec 2014 14:20:26 +0000 (15:20 +0100)]
Fix build error ('out' may be used uninitialized)

[Bug/Feature]   build error
[Cause]         uninitialized variable
[Solution]      initialize variable
[Verification]  build

Change-Id: I15fa8909d96a5f61998fb774efbc698cb21744f8
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
9 years agoSupport for boost version less then 1.54 -- disbale move in config union 32/31832/4
Mateusz Malicki [Wed, 10 Dec 2014 17:24:32 +0000 (18:24 +0100)]
Support for boost version less then 1.54 -- disbale move in config union

[Bug/Feature]   Boost < 1.54 doesn't support rvalues in boost::any, better rvalues tests
[Cause]         ConfigUnionTest doesn't pass if compiled with boost 1.51
[Solution]      Changes in libConfig; Disable moving in union
[Verification]  Build, install, run tests

Change-Id: I3bb6af655fa9393bfab66d535705fa252ecf6174

9 years agoFix doxy comments and some other warnings 75/31775/1
Piotr Bartosiewicz [Tue, 9 Dec 2014 16:08:00 +0000 (17:08 +0100)]
Fix doxy comments and some other warnings

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build

Change-Id: I5cff5b198d533ec256d551d9e8280a5c117e06d4

9 years agoCMake options for fsanitize and additional warnings 67/31767/1
Piotr Bartosiewicz [Tue, 9 Dec 2014 14:23:54 +0000 (15:23 +0100)]
CMake options for fsanitize and additional warnings

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I7d54cec67d9d15c750a7108bd9d24a508be0d103

9 years agoRename containers to zones 11/31711/3
Dariusz Michaluk [Mon, 8 Dec 2014 13:04:46 +0000 (14:04 +0100)]
Rename containers to zones

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I3d9eb8894c1d236061a0abe35691be6c57839702
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
9 years agoRename security containers to vasum 51/31651/4
Dariusz Michaluk [Fri, 5 Dec 2014 15:25:48 +0000 (16:25 +0100)]
Rename security containers to vasum

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I1df0eb506d03bde0f288322deaa0159741930199
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
9 years agoImplementation of provisioning functions (store declarations) 08/31208/10
Mateusz Malicki [Tue, 2 Dec 2014 13:52:47 +0000 (14:52 +0100)]
Implementation of provisioning functions (store declarations)

[Feature]       Posibility to store provisioning declarations
[Cause]         N/A
[Solution]      Store declarations in config file (using libConfig)
[Verification]  Build, install, run tests

Change-Id: Ie661f1b560adc96798acc7911a2d86eb12fa6616

9 years agoTest ability to copy union and to set union type 18/31218/5
Mateusz Malicki [Tue, 2 Dec 2014 15:17:13 +0000 (16:17 +0100)]
Test ability to copy union and to set union type

[Bug/Feature]   Test ability to copy union and to set union type
[Cause]         Need to copy and add new union elements
[Solution]      1) Clear vector with unions; 2) set, copy and move elements
[Verification]  Build, install, tests

Change-Id: Iea2d7eca36edcfd34f768d1e99a3da970300afd8

9 years agoIPC: Replace PeerID witch peer's file descriptor 59/31659/2
Jan Olszak [Mon, 8 Dec 2014 12:41:39 +0000 (13:41 +0100)]
IPC: Replace PeerID witch peer's file descriptor

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I30203990d9c9c3a58515d2fe09b074072122c156

9 years agoFix some other threading issues 50/31650/3
Piotr Bartosiewicz [Mon, 8 Dec 2014 11:52:32 +0000 (12:52 +0100)]
Fix some other threading issues

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I89b35811644f424773c007bb7d13d622ba57ac48

9 years agoFix ipc threading issues 49/31549/1
Piotr Bartosiewicz [Fri, 5 Dec 2014 14:57:49 +0000 (15:57 +0100)]
Fix ipc threading issues

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I0f403bdb9dd535186a7c1fa10a486da265858ad7

9 years agoUnit tests configs refactor 79/31379/1
Piotr Bartosiewicz [Thu, 4 Dec 2014 12:03:24 +0000 (13:03 +0100)]
Unit tests configs refactor

[Bug/Feature]   There was no possibility to test adding multiple zones
                using templates
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: Ie5ea1c2c2a227e0bb4ed9d02aa2965e5b2443f44

9 years agoRename domain to zone in files names 68/31368/1
Dariusz Michaluk [Thu, 4 Dec 2014 10:49:49 +0000 (11:49 +0100)]
Rename domain to zone in files names

Change-Id: If4e79cb41a4af6398ca27ba4c434554dbc090c16
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
9 years agoRename domain to zone 64/31364/1
Dariusz Michaluk [Tue, 2 Dec 2014 14:18:51 +0000 (15:18 +0100)]
Rename domain to zone

Change-Id: Ic17dd814bc8fd19848bf936bd2ffebc7da1acf6c
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
9 years agoAdded lock_domain/unlock_domain to container manager 11/31111/6
Dariusz Michaluk [Thu, 27 Nov 2014 14:05:36 +0000 (15:05 +0100)]
Added lock_domain/unlock_domain to container manager

[Feature]      Ability to lock/unlock domain
[Cause]        The need for the ability to lock/unlock domains
[Solution]     Add lock_domain/unlock_domain function
[Verification] Build, install, run

Change-Id: I169f94ceef462346a33530ec467c9bb239b57d85
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
9 years agoFix: Removed comma at end of enum 55/31355/1
Mateusz Malicki [Thu, 4 Dec 2014 09:50:16 +0000 (10:50 +0100)]
Fix: Removed comma at end of enum

[Bug/Feature]   Gcc 4.6 does not complie
[Cause]         N/A
[Solution]      N/A
[Verification]  Build

Change-Id: Ic293014b3211fea8b0896a93e5336f59a3a9956f

9 years agoAdd stubs for provisioning 09/31209/5
Mateusz Malicki [Fri, 28 Nov 2014 13:50:15 +0000 (14:50 +0100)]
Add stubs for provisioning

[Bug/Feature]   Stubs (client and server) for provisioning
[Cause]         N/A
[Solution]      N/A
[Verification]  Build

Change-Id: Id8f4a0cb3d59fce8fed6f036b0d57f480ffff275

9 years agoFix compilation issue 05/31305/1
Piotr Bartosiewicz [Wed, 3 Dec 2014 16:03:43 +0000 (17:03 +0100)]
Fix compilation issue

[Bug/Feature]   Code does not compile under gcc 4.6
[Cause]         N/A
[Solution]      N/A
[Verification]  Build

Change-Id: I883ae5c04de5dafd690e4ac2c1956780f8d20725

9 years agoIPC: CallQueue 23/31223/5
Jan Olszak [Tue, 2 Dec 2014 16:27:17 +0000 (17:27 +0100)]
IPC: CallQueue

[Bug/Feature]   CallQueue to wrap the Calls' queue
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I9519114e1c6f2e4040e956ae54f5093646f2dfaf

9 years agoFix running tests under valgrind 19/31219/3
Piotr Bartosiewicz [Tue, 2 Dec 2014 15:27:25 +0000 (16:27 +0100)]
Fix running tests under valgrind

[Bug/Feature]   Running LXC commands via exec, new building flag
                USE_EXEC
[Cause]         N/A
[Solution]      N/A
[Verification]  Build with and without USE_EXEC, run tests

Change-Id: I42a2745d81d309922704bd213a72727b4c613c40

9 years agoIPC: Signals 19/31019/6
Jan Olszak [Thu, 27 Nov 2014 13:02:11 +0000 (14:02 +0100)]
IPC: Signals

    [Bug/Feature]   Signals in the IPC mechanism
    [Cause]         N/A
    [Solution]      N/A
    [Verification]  Build, install, run tests

Change-Id: Ie84b88ffa2956e744216d9ff7e9c227631f78e50

9 years agoSupport for destroying container 66/30966/3
Piotr Bartosiewicz [Thu, 27 Nov 2014 15:39:33 +0000 (16:39 +0100)]
Support for destroying container

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I4303284b06fdebf452a040c9dfa2c1cddc0b8abf

9 years agoAdded testing union in config file 88/30888/6
Mateusz Malicki [Wed, 26 Nov 2014 14:24:00 +0000 (15:24 +0100)]
Added testing union in config file

[Bug/Feature]   Testing union in config file
[Cause]         Added union to config
[Solution]      Added union field in testing structure
[Verification]  Build, install, run scs tests

Change-Id: I538e6ea370ea1a57f647bbde0f040b1585a4fd0a

9 years agoAdd tizen common (with wayland) lxc template 27/30727/5
Dariusz Michaluk [Mon, 24 Nov 2014 14:33:27 +0000 (15:33 +0100)]
Add tizen common (with wayland) lxc template

Change-Id: If6d1fe2641f9a36a7d3a8c16b9a658661491ff13
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
9 years agoAdded lock_domain/unlock_domain to cli 32/30832/1
Dariusz Michaluk [Tue, 25 Nov 2014 15:13:41 +0000 (16:13 +0100)]
Added lock_domain/unlock_domain to cli

[Feature]      Ability to lock/unlock domain through cli
[Cause]        The need for the ability to lock/unlock domains
[Solution]     Add lock_domain/unlock_domain cli function
[Verification] Build, install, run

Change-Id: I4a017b328f0b44913f0561bd444e913c68f67359
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
9 years agoAdd client stubs for domain lifetime management 18/30818/2
Dariusz Michaluk [Tue, 25 Nov 2014 13:33:28 +0000 (14:33 +0100)]
Add client stubs for domain lifetime management

[Bug/Feature]   Client stubs for domain lifetime management
[Cause]         N/A
[Solution]      N/A
[Verification]  Build

Change-Id: I4b6b659e4de5e18d2b00851ecbdeacfd80e3d442
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
9 years agoTemplated network configuration 19/30819/2
Piotr Bartosiewicz [Tue, 25 Nov 2014 13:47:58 +0000 (14:47 +0100)]
Templated network configuration

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run test

Change-Id: I46af4da7ad656b05193184fc972c1d7489eb25f6

9 years agoFix RPM build error 17/30817/1
Dariusz Michaluk [Tue, 25 Nov 2014 13:47:46 +0000 (14:47 +0100)]
Fix RPM build error

[Bug/Feature]   RPM build error
[Cause]         Installed but unpackaged file found
[Solution]      Add file
[Verification]  Build

Change-Id: Ic4f8258386ae9a289c637cf28ac878effda0e197
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
9 years agoFix create container from template 31/30731/3
Piotr Bartosiewicz [Mon, 24 Nov 2014 16:10:29 +0000 (17:10 +0100)]
Fix create container from template

[Bug/Feature]   Templates stops working after migration to lxc
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: Ifbc0db612391eb7460b757b3cd12dda79183178b

9 years agoIPC: Refactoring 34/30734/1
Jan Olszak [Mon, 24 Nov 2014 16:30:27 +0000 (17:30 +0100)]
IPC: Refactoring

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I421b6af0c5da5b6f1d73d69e491e976f84894272

9 years agoIPC: NONBLOCK sockets 19/30519/7
Jan Olszak [Mon, 17 Nov 2014 11:58:32 +0000 (12:58 +0100)]
IPC: NONBLOCK sockets

[Bug/Feature]   All writes and reads have timeout
                Timeout in callSync removes the peer
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I86213b04e435a48bc56ae6f995a0c364b712a4d0

9 years agoMerge remote-tracking branch 'origin/unstable' into tizen 80/30580/1
Piotr Bartosiewicz [Thu, 20 Nov 2014 14:23:08 +0000 (15:23 +0100)]
Merge remote-tracking branch 'origin/unstable' into tizen

Conflicts:
packaging/security-containers.spec
server/CMakeLists.txt
tests/unit_tests/CMakeLists.txt
tests/unit_tests/client/ut-client.cpp

Change-Id: I9bc4f97213d9112766345411ceac2436a7d15d05

9 years agoFix lxc templates 63/30563/1 unstable
Piotr Bartosiewicz [Thu, 20 Nov 2014 12:09:49 +0000 (13:09 +0100)]
Fix lxc templates

[Bug/Feature]   Tests was failing on some images
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I9b2029539a4c5567b6eaed178ef1df2b7dce3c44

9 years agoFixing build brake for gcc 4.6 35/30535/2
Jan Olszak [Wed, 19 Nov 2014 14:26:28 +0000 (15:26 +0100)]
Fixing build brake for gcc 4.6

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build with older gcc

Change-Id: I0c889f7d79e10403a18b915c0c30e91400542de4

9 years agoFix compilation problems 26/30526/1
Piotr Bartosiewicz [Wed, 19 Nov 2014 12:37:16 +0000 (13:37 +0100)]
Fix compilation problems

[Bug/Feature]   Code does not build using older gcc
[Cause]         N/A
[Solution]      N/A
[Verification]  Build

Change-Id: Ifd7dd7bce080ac16983a23d30585ace08a522f05

9 years agoImplement lookup_domain_by_id function in server, client and cli 39/30339/3
Mateusz Malicki [Fri, 14 Nov 2014 15:38:16 +0000 (16:38 +0100)]
Implement lookup_domain_by_id function in server, client and cli

[Bug/Feature]   Implement lookup_domain_by_id function in server, client and cli
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, run appropriate function (through cli)

Change-Id: I2908e760613532caadcc9c58a1d522d4ac7767c4

9 years agoLxc networking 40/30440/4
Piotr Bartosiewicz [Tue, 18 Nov 2014 12:34:58 +0000 (13:34 +0100)]
Lxc networking

[Bug/Feature]   Add lxc network config. Remove dead network code.
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run

Change-Id: I2883858dbd571a01c93f6cc8c6b47cffe970a42a

9 years agoIPC: Pass error to return the value callback 25/30225/7
Jan Olszak [Wed, 12 Nov 2014 14:36:09 +0000 (15:36 +0100)]
IPC: Pass error to return the value callback

[Bug/Feature]   Return value callback takes status enum
                Peer's socket is locket when processing
                the callbacks.
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I74f30713e7c4fa6d8f35b79c2485137d1c9119c3

10 years agoFix shutdown for systemd init 13/30313/2
Piotr Bartosiewicz [Fri, 14 Nov 2014 11:20:04 +0000 (12:20 +0100)]
Fix shutdown for systemd init

[Bug/Feature]   Systemd does not shutdown on signal
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests, run container

Change-Id: Ic4b617c1a35a260803961fb17aba1da51c3af013

10 years agoAdd client stubs for domain image management 00/30300/1
Mateusz Malicki [Fri, 14 Nov 2014 07:58:01 +0000 (08:58 +0100)]
Add client stubs for domain image management

[Bug/Feature]   Client stubs for domain image management
[Cause]         N/A
[Solution]      N/A
[Verification]  Build

Change-Id: I1e193a41b86d75333ed8dc0f165c42e52a1c16f9

10 years agoAdd client stubs for domain devices management 66/30266/1
Mateusz Malicki [Wed, 12 Nov 2014 15:10:30 +0000 (16:10 +0100)]
Add client stubs for domain devices management

[Bug/Feature]   Client stubs for domain devices management
[Cause]         N/A
[Solution]      N/A
[Verification]  Build

Change-Id: Ie34fff4507fa7277a2327983ae3bd6b7c732ae82

10 years agoAdd client stubs for domain lifetime management 15/30215/2
Mateusz Malicki [Wed, 12 Nov 2014 14:32:49 +0000 (15:32 +0100)]
Add client stubs for domain lifetime management

[Bug/Feature]   Client stubs for domain lifetime management
[Cause]         N/A
[Solution]      N/A
[Verification]  Build

Change-Id: Ibf6c8f769bf2bfab4e7960a6775fb1064990fc2d

10 years agoAdd client stubs for getting domain informations 14/30214/2
Mateusz Malicki [Wed, 12 Nov 2014 13:43:18 +0000 (14:43 +0100)]
Add client stubs for getting domain informations

[Bug/Feature]   Client stubs for getting domain informations
[Cause]         N/A
[Solution]      N/A
[Verification]  Build

Change-Id: If800ae1396f3ec2e1a39d144ab6e93ea583b8949

10 years agoLxc server configs, missing ContainerAdmin stuff 92/29892/3
Piotr Bartosiewicz [Wed, 5 Nov 2014 14:00:03 +0000 (15:00 +0100)]
Lxc server configs, missing ContainerAdmin stuff

WORK IN PROGRESS

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  All tests should pass

Change-Id: I87505823a5b1c543ee495ede010430bb8c745736

10 years agoIPC via UX sockets 18/29718/15
Jan Olszak [Mon, 3 Nov 2014 06:52:00 +0000 (08:52 +0200)]
IPC via UX sockets

[Bug/Feature]   IPC for communication between the library and daemon
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I9880c7b4f3104b93f38d0e6ad86762fb17013d28

10 years agoAdd vsm_del_state_callback and vsm_del_notification_callback functions 17/30017/2
Mateusz Malicki [Fri, 7 Nov 2014 08:25:00 +0000 (09:25 +0100)]
Add vsm_del_state_callback and vsm_del_notification_callback functions

[Feature]      Add possibility to unsubscribe from signal
               (unregister state callback and notification callback)
[Cause]        N/A
[Solution]     API Change:
               * add vsm_del_state_callback and vsm_del_notification_callback,
               * change vsm_add_notification_callback and vsm_add_state_callback signatures
[Verification] Compile

Change-Id: Ia390a41175c6b3bd9334018c28f61533c248fc05

10 years agoRename cli, client library and client test functions 95/29995/1
Mateusz Malicki [Thu, 6 Nov 2014 17:31:58 +0000 (18:31 +0100)]
Rename cli, client library and client test functions

[Feature]      Brave New Name
[Cause]        New name of SCS
[Solution]     Rename:
               * sc_ -> vsm_
               * Sc -> Vsm,
               * SC -> VSM,
               * container_dbus_state -> add_state_callback,
               * get_container_id_by_pid -> lookup_domain_by_pid,
               * get_container_ids -> get_domain_ids
[Verification] Compile

Change-Id: Icaffebaa5e7a0e9d5869a9d2ec701bf385e99529

10 years agoBind LxcDomain to the logic 72/29572/2
Piotr Bartosiewicz [Wed, 29 Oct 2014 15:48:00 +0000 (16:48 +0100)]
Bind LxcDomain to the logic

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  All tests should pass

Change-Id: I212f4cfa2b377ed03c0cd08d03bba0772524da1b

10 years agoAdded add_container to cli 10/29010/3
Mateusz Malicki [Mon, 20 Oct 2014 08:14:42 +0000 (10:14 +0200)]
Added add_container to cli

[Feature]      Ability to add container through cli
[Cause]        The need for the ability to add containers
[Solution]     Add add_container cli function
[Verification] Build, install, run add container

Change-Id: I020bddaa3707f0e84227a35a85d0905fbb81d6be

10 years agoAdded sc_add_container to security-container's client 09/29009/3
Mateusz Malicki [Mon, 20 Oct 2014 07:34:33 +0000 (09:34 +0200)]
Added sc_add_container to security-container's client

[Feature]      Ability to add container through SCS client
[Cause]        Cli need this
[Solution]     Add sc_add_container client function
[Verification] Build, install, run Client/AddContainerTest test

Change-Id: Ie0179cb02bdf1946fb9f8d2fd2f3c303cda401fe

10 years agoHandle empty container name in AddContainer API 54/29254/2
Lukasz Kostyra [Thu, 23 Oct 2014 11:31:30 +0000 (13:31 +0200)]
Handle empty container name in AddContainer API

[Bug]           AddContainer API did not handle the case when container id was empty.
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, try adding a container with empty string as name.

Change-Id: I9340e56c58070c5b4c7aa1a0e4d7c2f5ea9c3aa6

10 years agoImprovements to SCS API 09/29109/2
Lukasz Kostyra [Mon, 20 Oct 2014 12:00:32 +0000 (14:00 +0200)]
Improvements to SCS API

[Bug]           * removeAllWrapper caught wrong type of exception
                * AddContainer did not focus container after adding
                * getActiveContainerId segfaulted when no container was present
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests.

Change-Id: I6bc665952c0f0c515c3aa548bdd6165b2ee7d55b

10 years agoAdd launchAsRoot and use it when adding new container 22/29022/4
Lukasz Kostyra [Thu, 16 Oct 2014 12:44:52 +0000 (14:44 +0200)]
Add launchAsRoot and use it when adding new container

[Feature]       Function launchAsRoot.
[Cause]         Some functions need to be launched as root.
[Solution]      Add launchAsRoot which forks, sets UID to 0 and then calls a function.
[Verification]  Build, install, run tests. Add new container - no copying errors should occur.

Change-Id: Iaf917108ea4c7c699d9f2d69c8100430daa4f9c4

10 years agoFix issue with permissions when copying dir contents 21/29021/3
Lukasz Kostyra [Tue, 14 Oct 2014 08:00:49 +0000 (10:00 +0200)]
Fix issue with permissions when copying dir contents

[Bug]           Permission denied error when trying to copy read-only directories recursively.
[Cause]         boost::filesystem::copy applied permissions immediately, which in some cases caused
                error when trying to write something inside processed directory.
[Solution]      Instead of using boost::filesystem::copy on directories, split action into three
                sub-actions:
                  * Create new directory with boost::filesystem::create_directory
                  * Call copyDirContentsRec() to copy contents of processed directory
                  * Apply source directory permissions and ownership
[Verification]  Build, install, run tests.

Change-Id: Ifdec110a595dcecd113abf4065dd1cdc03f2d3cb

10 years agoGet rid of libvirt configs 56/29256/2
Piotr Bartosiewicz [Thu, 23 Oct 2014 11:56:44 +0000 (13:56 +0200)]
Get rid of libvirt configs

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  N/A

Change-Id: Ibefee41db18ace8e000671f7bedd6a075e9ce8db

10 years agoLxcDomain class with tests 01/29101/4
Piotr Bartosiewicz [Tue, 21 Oct 2014 09:19:58 +0000 (11:19 +0200)]
LxcDomain class with tests

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  N/A

Change-Id: Ibfd0593d92cb9cd4bc52430e4207b93a1a53ecf8

10 years agoFix missing package dependency 19/29119/1
Piotr Bartosiewicz [Tue, 21 Oct 2014 13:32:06 +0000 (15:32 +0200)]
Fix missing package dependency

[Bug/Feature]   Test package require python-xml for working.
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests.

Change-Id: I08774f20115dfd4d4ab18a65dd4ac395fb6322ce

10 years agoRemove libvirt code (prepare to replace with lxc) 97/29097/2
Piotr Bartosiewicz [Wed, 8 Oct 2014 07:55:48 +0000 (09:55 +0200)]
Remove libvirt code (prepare to replace with lxc)

Note configs are not removed yet

[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  N/A

Change-Id: Ibf61dfb56d6d6a413c4161d9dae69bd1e9de97a5