Dongsun Lee [Thu, 26 May 2016 06:28:01 +0000 (15:28 +0900)]
change API header file names
[src/include/csr directory]
- content-screening-types.h => csr-content-screening-types.h
- content-screening.h => csr-content-screening.h
- engine-manager.h => csr-engine-manager.h
- error.h => csr-error.h
- web-protection-types.h => csr-web-protection-types.h
- web-protection.h => csr-web-protection.h
[src/include/csre directory]
- content-screening-engine-info.h => csre-content-screening-engine-info.h
- content-screening-types.h => csre-content-screening-types.h
- content-screening.h => csre-content-screening.h
- error.h => csre-error.h
- web-protection-engine-info.h => csre-web-protection-engine-info.h
- web-protection-types.h => csre-web-protection-types.h
- web-protection.h => csre-web-protection.h
Change-Id: Iaeb2f9a02994824ebc8d5d5b6223d5db8c22b53e
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
sangwan.kwon [Thu, 26 May 2016 06:01:43 +0000 (15:01 +0900)]
Fix white-space character in popup
* elm_object_text does not recognize '\n'
* So, change to '<br>'
Change-Id: Ic5dd833dac344b74f9a1b23e7a946dff29e7aea3
Kyungwook Tak [Wed, 25 May 2016 07:39:32 +0000 (16:39 +0900)]
Convert engine ec (file not found) to capi ec
When processing async request, engine returned internal error if
file permission changed/removed after scannable list provided by server.
Only file system related error code is ignored on async logic so it
would be considered as another error if it comes to engine internal.
So file not found ec in csre/error.h should be converted to capi ec.
Change-Id: I685e23d04e947d9cbe9c6e1dfee410a7ef8dc4e3
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Wed, 25 May 2016 06:33:18 +0000 (15:33 +0900)]
Fix crash in onMessageProcess
Crash rarely occured when bind dtor in onMessageProcess.
Traced by gdb and there's crash when dtor std::vector(RawBuffer)
parameter.
So don't write code tightly in order to value used as rvalue for
automatically moved. Assign lvalues to inbuf/outbuf/task and move it by
std::move when needed manually.
Change-Id: I2b381331546f1b24c0c500851725376cf100a1cc
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Wed, 25 May 2016 02:35:24 +0000 (11:35 +0900)]
Change sample engine dir to inside of ro csr dir
Change-Id: Iea8f21b1d3a41119757031dc75a7383e5e102533
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Wed, 25 May 2016 04:52:40 +0000 (13:52 +0900)]
Use pkg path to extract metadata for app
When scan file requested on file which is in app and no perm to read,
app metadata cannot extracted. It could be fixed automatically if
default smack rule inserted(for reading all of app directory), but
there's a lot of logics in app directory and we can be safe by this
additional fence.
Change-Id: Id244933dcd70b41d05a5258857a1fd6898b22213
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Wed, 25 May 2016 04:50:56 +0000 (13:50 +0900)]
DB detected item cleanup only when history exist
When scan heavily at first time, it's too much overhead.
Delete item only when needed.
Change-Id: Iefa55b5e9b04f9a3eb5ea25007b1ee6e42690bfd
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Wed, 25 May 2016 04:38:03 +0000 (13:38 +0900)]
Ignore all file system exceptions in dir scanning
In async logic, the scan file list is provided by server so client just
use it. So this exceptions can be occured when the file is removed /
changed between the time from server extracts scannable files to scan
the each file.
Change-Id: Ic6c0d3ac2f855663c3bba7532b2f3942549814bd
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Wed, 25 May 2016 04:37:05 +0000 (13:37 +0900)]
Print log of command id that service received
Change-Id: I2b4173d1e5405c0d1fe61367aa9a09383838dc7d
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Wed, 25 May 2016 04:31:19 +0000 (13:31 +0900)]
Return SchemaVersion::NOT_EXIST
Instead of throw exception, return enum value which means not exist when
get schema version in Db::Manager ctor.
And don't throw exception in Db::Statement dtor. it's useless and
uncatchable.
Change-Id: I0f93df10d21d8d0685c3b9a25b0aa5fc4406b0aa
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Wed, 25 May 2016 04:29:46 +0000 (13:29 +0900)]
Canonicalize path when scan file.
Throw appropriate exception when file not found on canonicalization.
Change-Id: Iaba4e51c124c7d47188b288260ca8175260edcfe
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Wed, 25 May 2016 04:29:00 +0000 (13:29 +0900)]
[BugFix] open and not close fd in cs sample engine
Change-Id: I4a7d71acfccd862362716adbded0e66eedd7a7e9
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Tue, 24 May 2016 02:57:11 +0000 (11:57 +0900)]
Fix 64-bit arch portability issue
With time_t type serialization overloading function...
in 64bit arch: compile error. conflicted with int64_t type function.
in 32bit arch: works fine.
Without time_t type serialization overloading function...
in 64bit arch: works fine.
in 32bit arch: compile error. time_t type overloaded function not found.
So time_t type serialization overloading is removed and it's converted
to int64_type when serialize/deserialize. Then it works fine on both of
architectures
Change-Id: Ic85d9e1de31fd6d6b64b57f3f8dcaae54f5bb290
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Tue, 24 May 2016 01:51:24 +0000 (10:51 +0900)]
Add cynara backend
For now, smack backend & 2.4 platform version base selected.
access control backend is selected by macro defined in top of the spec
file. pkgmgr API is bit different between 3.0 and lower because of
multi-user so it's branched by preprocessor by PLATFORM_VERSION_3 definition.
Change-Id: I1b587e7a9fd8c8e120be53d6065b03b6d5aed4d9
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Dongsun Lee [Thu, 19 May 2016 02:23:29 +0000 (11:23 +0900)]
Add TC: async scan and engine management
Change-Id: If67eeb7000c15442939c69468577bd3ae0b12aad
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
Kyungwook Tak [Mon, 23 May 2016 08:00:10 +0000 (17:00 +0900)]
Check pkg id by pkgmgr-info API additionally
Change-Id: I614e244da92bc68d38c5719dfac8f8959a672ffe
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Mon, 23 May 2016 05:27:04 +0000 (14:27 +0900)]
Return no task error in case of nothing to stop
Change-Id: I5fc3740c1e990eec816fff7d19a476204d04ea2d
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Kyungwook Tak [Mon, 23 May 2016 01:46:20 +0000 (10:46 +0900)]
Set dir timestamp at the end of scan dir
Change-Id: Ib83e33ad175857d6dd4ec77e94a0432bdcd86405
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Dongsun Lee [Fri, 20 May 2016 07:03:17 +0000 (16:03 +0900)]
network bug fix for large data transportation
- bug fix of bucket in binary-queue
- write data size before writing real data
Change-Id: Ia63fc767484dd31228927038208fb106941a154c
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
Kyungwook Tak [Mon, 16 May 2016 11:21:07 +0000 (20:21 +0900)]
Turn on feature: engine state (enable / disable)
Change-Id: Ife9f6930211854e37fb5419c882e89a4ebe36e5d
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
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>