Kyungwook Tak [Thu, 19 May 2016 07:52:49 +0000 (16:52 +0900)]
Do not wait for complete event when uninstall app
Sometimes timeout callback behaves undefine way.
Even though pkgmgr_client_uninstall API returns success and it's
uninstalled really on pkgmgr server side but timeout callback runs
immediately several times on csr server side.
So we just believe pkgmgr_client_uninstall returned value. Other pkgmgr
client API users(settings, homescreen, menubar, etc.) uses it like
this(without g_main_loop and end callback).
Change-Id: I5e5b0894303752ae33bb3e9e4f7232d8e79f2cb4
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Dongsun Lee [Tue, 17 May 2016 01:43:53 +0000 (10:43 +0900)]
[CAPI Changed] add ec and remove fields in enum
error code added: CSR_ERROR_FILE_CHANGED
error code typo fixed: CSR_ERROR_ENGINE_DISABLED
enum field removed from csr_cs_response_e: CSR_CS_SKIP, CSR_CS_IGNORE.
CSR_CS_IGNORE -> replaced with CSR_CS_PROCESSING_ALLOWED
CSR_CS_SKIP -> replaced with CSR_CS_PROCESSING_DISALLOWED
Change-Id: I3fb45053bb3e541b36c4027c1a2f738f8ac86dc7
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
Kyungwook Tak [Wed, 18 May 2016 13:56:56 +0000 (22:56 +0900)]
Determine file changed by changed time
For modified time (st_mtime field in struct stat), it isn't updated on
tpk package in same cases. The modified time is fixed on when it
packaged, so use changed time instead.
Change-Id: Id8ea85ebca8a8c8b5fec224b936c538c44807592
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Thu, 19 May 2016 06:06:53 +0000 (15:06 +0900)]
Fix indexing of db schema and add foreign key pragma
Change-Id: I4cbf6513b43aea48688a42669235bce67331d74e
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Thu, 19 May 2016 05:09:03 +0000 (14:09 +0900)]
See fileInAppPath when judge status of app
Change-Id: I02689184f134bca02255bce9eb629f5f7c0d0f06
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Wed, 18 May 2016 14:53:04 +0000 (23:53 +0900)]
Add smack rule for uninstall app
Change-Id: I0e30ef0d8f4a2675f51af7fd230a917d6c9681c8
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Wed, 18 May 2016 14:50:29 +0000 (23:50 +0900)]
Make header for common test resource definition
Change-Id: I71f20bc2a78465e5e38b723b0d669545a989ba6a
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Wed, 18 May 2016 02:57:52 +0000 (11:57 +0900)]
Redesign db schema for app history handling
Change-Id: I75e0ce4ada946b3c3ad4b39fdabb09c6a3bbcd48
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Tue, 17 May 2016 08:38:35 +0000 (17:38 +0900)]
Fix failed test cases and make test common lib
Test common library for all of test binaries
Change-Id: I41a72a170050e1c86662c5c75c0e1fc1b4ae131e
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Tue, 17 May 2016 02:12:35 +0000 (11:12 +0900)]
Don't return ignored items as detected
Change-Id: Ieba3da918ab3f28ea5875047cc8ba7fd3bdec2ba
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Mon, 16 May 2016 10:21:35 +0000 (19:21 +0900)]
Keep single instance of loaders and db manager
loaders and db manager instance is created in service layer and being
delivered as reference to logics respectively.
loader global init/deinit in ctor/dtor and can be re-plugged by 'reset'
member function. This will be used for switching engine library later.
Change-Id: I76f6cd2571de0a09a9394df5d0c8252b47fa8270
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Dongsun Lee [Tue, 17 May 2016 04:31:15 +0000 (13:31 +0900)]
add TCs for web protection
Change-Id: I546c2b856327687a3cf877c26fae4f11eca43971
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
Dongsun Lee [Fri, 13 May 2016 02:28:16 +0000 (11:28 +0900)]
add TCs for contents scanning
Change-Id: Ia1da131da0aab74efec0be15995e0a8496ff36f1
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
Kyungwook Tak [Mon, 16 May 2016 12:16:36 +0000 (21:16 +0900)]
[BUGFIX] candidate target name
individual detected malware history in app's target name should be
file's path instead of pkg path.
Change-Id: Id1becbd7ef3954b9722f1eae9a30e196b6326aed
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Mon, 16 May 2016 08:48:09 +0000 (17:48 +0900)]
Inserts detected history per file when scan app
Change-Id: I060421272f7ddc14bcca6942356b2e8979ed5e04
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Mon, 16 May 2016 07:44:28 +0000 (16:44 +0900)]
Fix file system internal tc related modified time
Change-Id: I4a91d8f2220f161b29bc79e2f4f885671f081bde
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Mon, 16 May 2016 07:17:39 +0000 (16:17 +0900)]
Set null to optionally deserializable objects
Change-Id: Ia9e7a0bc123a9cb9e75e21c4aee8fd1a8891d52f
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Mon, 16 May 2016 05:36:17 +0000 (14:36 +0900)]
Integrate core-usage class to cs-logic
Change-Id: I08439cebbc93867b5a286a083b043c1ad4cd1055
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Mon, 16 May 2016 02:43:49 +0000 (11:43 +0900)]
Refactor core-usage class
Simplify interface. Only set/reset functionality needed.
Change-Id: I0a8fcdc9ffb75f5852835239b9974db69ac808ef
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Mon, 16 May 2016 04:44:34 +0000 (13:44 +0900)]
Conditional statement changed to detected modified
Treat as not-modified if stat modified time == modifiedSince time.
Change-Id: I39c25752bdc26bd57bf883cb533d42579eec43be
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Mon, 16 May 2016 04:33:33 +0000 (13:33 +0900)]
Remove useless catch & returning error statements
Change-Id: Id0cbb854c59b6952968654f40ab92cfb2799be23
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Mon, 16 May 2016 01:16:38 +0000 (10:16 +0900)]
Use std::invalid_argument instead of InvalidParam
std::invalid_argument exception can perfectly replaced with
InvalidParam custom exception
Change-Id: I2734d73d1c44480b0b969cb0255fffcbb74dfb74
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Fri, 13 May 2016 11:29:00 +0000 (20:29 +0900)]
Convert engine ec to CAPI ec by exception
Change-Id: Ifa2c94ff39dff24a12cad0541270e6fa6f751961
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Fri, 13 May 2016 10:38:54 +0000 (19:38 +0900)]
Check all parent dirs when getting last scan time
Change-Id: Ib994a45548f967cd367dbc60328d860f0719385f
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Fri, 13 May 2016 07:44:19 +0000 (16:44 +0900)]
Access control of privileged APIs
Access control performed in server-service layer, not by
smack-labeled socket. It's for two reasons below
1) for 3.0, privilege access control will be done by cynara.
2) judge status command is dispatched through CS socket but
privileged Admin (which is mapped to ADMIN socket) so there's
exception.
cynara integration will be done later by separated commit
with access-control-cynara.cpp
Change-Id: I8a747cd624e1b3d54ef91bbbf018d43da1d081a5
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Fri, 13 May 2016 06:00:01 +0000 (15:00 +0900)]
Separate logic codes per domain (cs, wp, admin)
Change-Id: I7bd1a9c88a7ae22b6385a6347600d73bf6857bc8
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Fri, 13 May 2016 02:36:07 +0000 (11:36 +0900)]
Canonicalize file/dir path set
Change-Id: Ib962c0ac99e75fd76db9d52fe673887447712aba
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Fri, 13 May 2016 03:00:02 +0000 (12:00 +0900)]
Return invalid handle ec appropriately on client
Change-Id: Icaf77dcdff29321b97a57242e7d3a11f378c272c
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Fri, 13 May 2016 02:46:37 +0000 (11:46 +0900)]
[BUGFIX] Some fields handling missed in CsDetected
isApp field and pkgId field is missed from all processes:
serilaize / deserialize / move ctor / move assignment
Change-Id: I167cb446da49d80ebc03f597ecd165bbcffd7d08
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Dongsun Lee [Thu, 12 May 2016 03:14:06 +0000 (12:14 +0900)]
change the API list with antivirus.admin privilege
Change-Id: Iaa75ab07cfd7190efacdef112e67bb79e2043b47
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
Kyungwook Tak [Thu, 12 May 2016 10:51:14 +0000 (19:51 +0900)]
Add smack rule for scanning media directory
Change-Id: I79f9f9facd4e2b0d06d1b2ad3eff2cfeec30d68e
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Thu, 12 May 2016 11:03:22 +0000 (20:03 +0900)]
Change detected class instance validation check
changed from target name to malware name.
In case of scan data, target name can be empty by default so
we cannot validate with target name's emptiness.
Malware name field is mandatory so always filled if detected
item is valid.
Change-Id: I7e2444019fa773e763910a1e83090bf9a705dc4e
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Wed, 11 May 2016 11:19:17 +0000 (20:19 +0900)]
Impl full-stack of engine-manager feature
Change-Id: Id16e10ef5d6fe8253796d833f8f15b8a1299aed7
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Thu, 12 May 2016 04:50:39 +0000 (13:50 +0900)]
Use socket per module (CS, WP, ADMIN)
Change-Id: Ifb0d21c101d51a538eda5c16b2744cf81cdd505d
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Mon, 9 May 2016 06:26:43 +0000 (15:26 +0900)]
Make app-aware for scan on cloud option
Change-Id: I83cd1c9a573a34ad3faf86a12a11d08dc7835aad
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Dongsun Lee [Wed, 11 May 2016 06:34:38 +0000 (15:34 +0900)]
add @tizen_since, @privlevel, and @privilege to API headers
Change-Id: I0b1d5d3194761ee52dd317eb80837be10d4ef254
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
Kyungwook Tak [Mon, 9 May 2016 04:42:13 +0000 (13:42 +0900)]
FIX: Prompting user is missed in some case
in scan file helper, prompt user is missed.
handling user response is packed to member method.
Change-Id: I55e5245df0b55f5c25afc921dbf67315afd7dfa1
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Mon, 9 May 2016 02:34:05 +0000 (11:34 +0900)]
Move regexpr for app directory aware to static
Change-Id: I482d57deb18981dffa21f068e1c67be5dc15f623
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Wed, 4 May 2016 08:11:06 +0000 (17:11 +0900)]
Fix descriptions of CAPI
Change-Id: Id7b78729a04fe7e46b45ba1d0345a6705f50cc99
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Wed, 4 May 2016 07:43:17 +0000 (16:43 +0900)]
Remove duplicated ldconfig requires definition
Change-Id: I64b0ea04b4ba5d7b8b4b1aad4b3d287823077c27
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Wed, 4 May 2016 05:08:34 +0000 (14:08 +0900)]
File removal on server side
No client credential check needed for file removal
Change-Id: I4e241c6eec5231a0dc53ed868cdaf1b973f1e21e
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Dongsun Lee [Mon, 9 May 2016 00:29:46 +0000 (17:29 -0700)]
Merge "add csr-framework-engine-devel rpm" into devel
Dongsun Lee [Wed, 4 May 2016 06:09:48 +0000 (15:09 +0900)]
add csr-framework-engine-devel rpm
Change-Id: I8b8fcff4919a8fa3852645c513d0dd40dd24d089
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
Kyungwook Tak [Wed, 4 May 2016 05:09:30 +0000 (14:09 +0900)]
Add libsmack to buildrequires list
Change-Id: Ia159c2137367e9a427223dfeeada991ca9d9d261
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Wed, 4 May 2016 04:55:45 +0000 (13:55 +0900)]
[CAPI changed] Remove threattype field in detected
Change-Id: I10ce04d2bf3130823ab77b184acc150d5d2b01a9
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Wed, 4 May 2016 04:33:21 +0000 (13:33 +0900)]
Disable ask user option for async operations
Change-Id: I3a708cbd55a3f467359323370ef8e8c264e9da22
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Wed, 4 May 2016 01:08:01 +0000 (10:08 +0900)]
CSR_CS_REMOVE_FAILED removed from response enum
remove failed info will be returned as error
code(CSR_ERROR_REMOVE_FAILED)
unlike other error cases, csr_cs_scan_file api allocates
detected handle when CSR_ERROR_REMOVE_FAILED returned
Change-Id: Ic4caf38b3a91da771813a83d4e3f4008a2251155
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Tue, 3 May 2016 09:20:11 +0000 (18:20 +0900)]
Catch exceptions on csr server logic
Change-Id: I0b967c20ee7bb4d78186e7225f8708d43e43a91e
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Tue, 3 May 2016 06:48:17 +0000 (15:48 +0900)]
Make get scannable files credential-aware
For files which are readable by server...
- and removable by client
-> list given to client
- and unremovable by client
-> list not given to client but scanning task of them
is submitted to workqueue so as to perform in background
Change-Id: I94d358f16d6781cc002e96c844b45e4d7fe59fd4
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Tue, 3 May 2016 02:14:15 +0000 (11:14 +0900)]
Add class for checking client credential
Change-Id: Id9ec5ff5238b2e1c6f7dfab44610c4588ae665d2
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Tue, 3 May 2016 05:27:48 +0000 (14:27 +0900)]
Add file system exceptions
Change-Id: If0510554ef7136875feb8aa6f01fac9a1122e4db
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Tue, 3 May 2016 02:13:03 +0000 (11:13 +0900)]
Select logic command in service level
Preparation of credential check mechanism.
Credential check (for privilege & remove file permission) is
essential and can be gotten from connection and we can retrieve
it in service level smoothly
Change-Id: Ib577e6e39bf52a868c2d52156a02f906b94ae46e
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Mon, 2 May 2016 02:13:51 +0000 (11:13 +0900)]
Impl logic of getting scannable files list
Change-Id: Iff585fff152059bc555637bdbef6a9e670dc7469
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Mon, 2 May 2016 05:10:15 +0000 (14:10 +0900)]
Refactor file system class
remove file visitor (only directory visitor needed)
File class and FsVisitor class can only be generated by create member
static func
Change-Id: I51610f4d7bef653b12e949dd33a720269cae1cfb
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Fri, 29 Apr 2016 10:12:27 +0000 (19:12 +0900)]
Impl logic of get detected/ignored/judge malware
Change-Id: Ifccccafb58d5408a6933b0673381f4295386aaee
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Fri, 29 Apr 2016 06:10:55 +0000 (15:10 +0900)]
Detach internal unit test from api test
Change-Id: I93a1cad926d94b4aaf5bfa8fb37a21d67a98c07e
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Fri, 29 Apr 2016 01:45:04 +0000 (10:45 +0900)]
Add custom exception derived from std::exception
Change-Id: I9cd2b806e8fd842c18f85480d173ff80d0c8280e
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Thu, 28 Apr 2016 04:28:03 +0000 (13:28 +0900)]
content scanning scan_file logic
Change-Id: I3882be7afdff968460c70eae6cb9ccbda41effbf
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Thu, 28 Apr 2016 05:53:25 +0000 (14:53 +0900)]
Row inherits CsDetected struct
remove unused functions in db namespace
remove modified_time field in db schema
modified_time isn't needed because we can determine whether
file is modified by comparing current time and detected_time
Change-Id: I95825bfbde8ada0649522088bc9a67b8874d32f0
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Thu, 28 Apr 2016 08:59:11 +0000 (17:59 +0900)]
Define user and group for filesystem accesscontrol
Change-Id: Idf6e373b453f76ca3b75f4bea09e5c404868f139
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Wed, 27 Apr 2016 09:29:40 +0000 (18:29 +0900)]
Popup service configuration changed
timeout time: 10sec. if it's too small and service wake up too
quickly repeatedly, it can be refused by systemd.
removed from default.targets
popup service shouldn't be run when boot up
Change-Id: I2ba37456cb15597db47676fd139cc224378f65ee
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Tue, 26 Apr 2016 07:06:08 +0000 (16:06 +0900)]
Popup ui command add for content scanning scenario
Change-Id: Iad9938ad36314f609e72913122b73c7813887a63
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Tue, 26 Apr 2016 12:14:04 +0000 (21:14 +0900)]
Type converter for capi <-> engine interface
Change-Id: I266fbcf1d4ad98db6fc4a054f4e0827f3d823dd1
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Wed, 27 Apr 2016 08:05:49 +0000 (17:05 +0900)]
[CAPI changed] csr_cs_response_e field added
Change-Id: Iaf42b7d9a42615da84819044c69e96cc5cb0e519
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Tue, 26 Apr 2016 11:43:34 +0000 (20:43 +0900)]
Move result list from context class to handle
Change-Id: I47b3688b2d5e3170985d23613c6f18521c6d1ee3
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Tue, 26 Apr 2016 08:52:58 +0000 (17:52 +0900)]
Classes encapsulation/abstraction changed in types
class Context
- To abstract class (IContext)
class CsContext and WpContext
- To unmovable, uncopyable. To copy shouldn't be done without
any notice. The only case to be moved was for serialization, so
it has been replaced to dynamic allocation not to be moved/copied
class Result
- To abstract class (IResult)
- To struct (break encapsulation). The reason of be class of it was
for polymorphism (can get/set member variables with IResult). But
when it goes into resource vector to be freed after appropriate
pointer is given to client. So it's not needed to be polymorphistic.
Change-Id: I54fd7479d4008dbcb65a3cae51ecee8a436f19d6
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Tue, 26 Apr 2016 06:43:30 +0000 (15:43 +0900)]
[CAPI changed] Getting detected/ingore malwares
input param changed from single dir path string to
multiple dir paths array and count
Change-Id: I10efb78f9d3034d2b3de6f973c4f72b52a689b1b
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Tue, 26 Apr 2016 05:09:57 +0000 (14:09 +0900)]
Apply tizen coding style, fixed by astyle tool
Change-Id: I498225155cd3d640468a36fcacae22484e0ed863
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Mon, 25 Apr 2016 09:02:30 +0000 (18:02 +0900)]
Engine loaders interation to logic
implement web-protection command in logic (check url)
for now, popup UI style is temporal. you can check it by
running csr-popup-test
Change-Id: I945fda037eaf55bef8d2c5c7a9ae538dea39578e
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Dongsun Lee [Wed, 20 Apr 2016 11:09:08 +0000 (20:09 +0900)]
Add APIs for app information
Change-Id: I609f31c28acec33076adfd0a901fc217c10bc20f
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
sangsu [Mon, 25 Apr 2016 04:54:16 +0000 (13:54 +0900)]
library loading and symbol match
Change-Id: Ia78701b4590737cd97c131502f303b73e608fb17
Signed-off-by: sangsu <sangsu.choi@samsung.com>
sangsu [Fri, 1 Apr 2016 05:11:37 +0000 (14:11 +0900)]
Add engine library loader classes
Change-Id: Iaf17a44a9e120e8ae0587fae839be20da6e3eb0d
Signed-off-by: sangsu <sangsu.choi@samsung.com>
Kyungwook Tak [Mon, 18 Apr 2016 09:40:11 +0000 (18:40 +0900)]
Catch exception when db not exist at first time
Getting schema version of db at first time is failed because
there isn't any table before constructed and exception is thrown.
Change-Id: I8b63429ae897048dedceeb67a9e3903aed47b765
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Fri, 15 Apr 2016 00:16:11 +0000 (09:16 +0900)]
Refactor db module
Change-Id: I5261a07b8f013fda50d37b2c95ee18787e2bb887
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Fri, 15 Apr 2016 05:22:54 +0000 (14:22 +0900)]
Fix bugs in class hierarchy derived from types.h
* class Result/Context shouldn't be constructed itself.
It can only be used in derived form.
* class Result has member variable so it has serializations.
Derived classes should be call it in serializations
* class Context don't has member variable which needs serialization.
So serialization isn't implemented on it and be abstract class.
* class Result can be empty which means nullptr (e.g. in case of
scan file and no malware detected, CsDetected should be null).
To support it, Result class has ''hasValue'' member variable.
All set functions in derived classes of Result class should call
setValueFlag() to mark that it has value.
Change-Id: I38a00a0da09da6b8cf67a568c8d9f7fbeed157f4
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Dongsun Lee [Fri, 15 Apr 2016 05:40:52 +0000 (14:40 +0900)]
change a parameter name from file_paths to dir_paths in csr_cs_scan_dirs_async
Change-Id: I880fc984f7f672637d4cd7c02e8e0123731b1472
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
Dongsun Lee [Fri, 15 Apr 2016 02:27:36 +0000 (11:27 +0900)]
add web protection client functionalities
Change-Id: I08d890f4873100e027ff2427054ba48e846e74aa
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
Dongsun Lee [Thu, 7 Apr 2016 04:09:20 +0000 (13:09 +0900)]
Add file management classes
Change-Id: Iddec7d00168e806d11f8d6e395355709b3458f8e
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
Kyungwook Tak [Tue, 12 Apr 2016 08:14:11 +0000 (17:14 +0900)]
Declare key-value pair options to context / result
Change-Id: I01cb343025647bdcdb5210a07a352d723182f59a
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Tue, 5 Apr 2016 08:51:27 +0000 (17:51 +0900)]
Async client stub initial commit
scan dir / scan dirs needs db integration in server, credential check
of client and filesystem related modules. For now it requests file lists
in target directory based on history and credentials (client-removable,
server-readable)
Change-Id: Ia487c916f31e70cc54b1b52b72dd98c096264dd0
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Dongsun Lee [Mon, 4 Apr 2016 04:30:52 +0000 (13:30 +0900)]
add set core-usage function
Change-Id: I2f1dd5dbf98a8285ea75f32b6f9664c2cf73ff10
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
Kyungwook Tak [Thu, 7 Apr 2016 02:47:07 +0000 (11:47 +0900)]
[Fix typo] in cmake include dir
Change-Id: I38ba0f7fc3c686309d1c1fa64b40ef75f6b1ed1b
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Wed, 6 Apr 2016 05:15:31 +0000 (14:15 +0900)]
Install headers under ${_prefix}/include/csr
Change-Id: I19595d2bb5a74498670b5c5fc90f4af42d55a4a4
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Tue, 5 Apr 2016 02:23:06 +0000 (11:23 +0900)]
Add init/deinit APIs to engine and refactor sample
sample engine refactored totally because engine handle
and context handle were tightly coupled and lot of c-style codes
Change-Id: Ie24a01880fc4b238aafddd32964a752c7cd469f6
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Fri, 1 Apr 2016 03:05:11 +0000 (12:05 +0900)]
Make thread safe read/write to connection
Currently read/write through connection has only single
socket/ read/write invocation so there isn't any race condition
between socket operations and linux socket guarantees thread safety
if it isn't non-blocking I/O mode.
(refer
- http://stackoverflow.com/questions/
33812734/is-af-unix-socket-send-thread-safe/
33813220
- http://pubs.opengroup.org/onlinepubs/
009695399/functions/write.html)
But in case of using non-blocking I/O mode later or not to dependent underlying
stream classes (e.g. socket, pipe, ...), connection class guarantees it to be safe concretely.
Change-Id: If1c423094fec2976bf20fb0026fca53ccfe14121
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Dongsun Lee [Fri, 1 Apr 2016 00:48:13 +0000 (09:48 +0900)]
Revert "Remove unused APIs related to ignored malware"
This reverts commit
ad8210d59f6f7e575545e3e440b33ee22fbc3c3a.
Change-Id: I6acf858d83990c45efccec9e76abfcd20350e164
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
Kyungwook Tak [Thu, 31 Mar 2016 13:25:54 +0000 (22:25 +0900)]
Simplify binary-queue and message-buffer
Remove unused features from binary-queue and
set maximum bucket size to 1024 bytes
Change-Id: Iba8b5e816986da2730236d61d6fd4c8923a6c43f
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Mon, 28 Mar 2016 13:01:47 +0000 (22:01 +0900)]
Refactor client connection based on DPM Client class
Change-Id: I02410693ff1718f10fdb611d273bdc3b56b05179
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Fri, 25 Mar 2016 08:49:35 +0000 (17:49 +0900)]
Add threadpool to server service
Change-Id: Ic4fa2ef017689def44401f8a027f08b5ccfce414
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Dongsun Lee [Tue, 29 Mar 2016 07:02:27 +0000 (16:02 +0900)]
Remove unused APIs related to ignored malware
- csr_cs_get_ignored_malware
- csr_cs_get_ignored_malwares
Change-Id: I3398c6a8db18bed845d525e2250919e6685d12ee
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
Dongsun Lee [Wed, 30 Mar 2016 05:07:24 +0000 (14:07 +0900)]
add threading flags of sqlite
- added MultiTread and Serialized flags
Change-Id: I3f1e71d96664d2c31fb290bdbdfee7fecd77e193
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
Dongsun Lee [Fri, 25 Mar 2016 11:49:42 +0000 (20:49 +0900)]
add APIs related with engine state and the type of timestamp in APIs changed to time_t
- csr_engine_set_state
- csr_engine_get_state
- add engine_state table
- the type of timestamp in content screening API is changed to time_t
Change-Id: I04d873719d6a85b67fb305ab20bda1c2262c3767
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
Dongsun Lee [Fri, 25 Mar 2016 11:04:15 +0000 (20:04 +0900)]
add db module
Change-Id: I55fc9a7a405d61d24c66368fdec4dc1c8b418c4d
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
Dongsun Lee [Tue, 22 Mar 2016 11:15:02 +0000 (20:15 +0900)]
add/remove/modify APIs.
- added: csre_wp_result_get_detailed_url
- added: csre_cs_scan_app_on_cloud
- added: csr_engine_get_lastest_update_time
- added: csr_engine_destroy
- added: csre_wp_engine_get_lastest_update_time
- added: csre_cs_engine_get_lastest_update_time
- removed: csre_cs_scan_file_by_fd
- removed: csre_cs_set_scan_on_cloud
Change-Id: I23820255cab0c8ae748d81640b622fded9d76efd
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
Kyungwook Tak [Tue, 22 Mar 2016 11:30:50 +0000 (20:30 +0900)]
Popup service initial commit
[Verification]
Run # csr-popup-test and see stdout is the same to the button what you clicked
TODO list
- Add language file when popup text format fixed
- Add more command items when popup related logic fixed
- Integrate to main logic when logic ready
Change-Id: If55574269aea8f77bde920d17b53dc564f94db72
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Tue, 22 Mar 2016 05:26:25 +0000 (14:26 +0900)]
Add engine APIs and sample engine & tests
Change-Id: I7aaa58c201f5ace245b660c3203f149bd701dfab
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Fri, 18 Mar 2016 07:56:46 +0000 (16:56 +0900)]
Integrate draft API header and internal test
Change-Id: I5c4f8bbeb4e0dbda352e4b6583350dcf3c8bf27c
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Wed, 16 Mar 2016 04:54:33 +0000 (13:54 +0900)]
Initial commit of server program and common lib
Base code of IPC is from device-policy-manager package
which is written by Jaemin Ryu (jm77.ryu@samsung.com)
Change-Id: Id00a88ee5711281ba6fc6a87dbeaba051c630246
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Thu, 17 Mar 2016 07:19:55 +0000 (16:19 +0900)]
Add gitignore file
Change-Id: Ib1e1e54d576f70fd5960e1e0d7ce1a482df26013
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Thu, 10 Mar 2016 06:59:25 +0000 (15:59 +0900)]
Refactor make system and directory hierarchy
To prepare development of new architecture of csr-framework
with server-client system
Change-Id: Iba7cd13de59a9029d280196b451da8a090239af7
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>