platform/core/system/libdbuspolicy.git
8 years agolibdbuspolicyt refactoring to meet Tizen coding style 92/70892/2
Kazimierz Krosman [Fri, 20 May 2016 15:23:39 +0000 (17:23 +0200)]
libdbuspolicyt refactoring to meet Tizen coding style

Change-Id: I9765dd74342d695d50b223185c71a84d7f0f1aa3

8 years agoTree policy engine decision checker replacement 94/70794/3
Kazimierz Krosman [Fri, 20 May 2016 11:15:10 +0000 (13:15 +0200)]
Tree policy engine decision checker replacement

Tree policy engine decision checker was replaced by naive
search algorithm. For each check call, libdbuspolicy iterate via
policy rules in the reverse order. First rule that matches request
is used to return decision.

Multiple sender's and receiver's names are proceeded during search
procedure (algorithm try to match current rule for each name). Previous version
search all database for each name.

Added unit tests (make check)

Change-Id: Ie78ae8eec285a7042d275d02333372bca4d76d28

8 years agoAllow incremental build 04/72104/1
Kazimierz Krosman [Fri, 27 May 2016 09:24:06 +0000 (11:24 +0200)]
Allow incremental build

Change-Id: Id8c02912d1ddf0d3a86bb5e5f999a1dbce035943

8 years agoFixed series of bugs and optimalised arguments preparation 93/70793/2
Konrad Lipinski [Wed, 13 Apr 2016 08:58:43 +0000 (10:58 +0200)]
Fixed series of bugs and optimalised arguments preparation

Fixed kdbus pool memory managment.
Refactored tslog (getenv called only once).
Removed duplicated credential information.
Dropped unused timeouts.
Added lockless calls when logs are disabled.
Removed udesc allocation.
Decreased KDBUS_POOL_SIZE from 16M to 1M.
Minor fixes.

Change-Id: I1e5fda8df4dbd1dd6dfecae60aff6d7d67705a3b

8 years agoInitialize policy database based on bus path 30/67830/4 accepted/tizen/common/20160429.170334 accepted/tizen/ivi/20160429.011829 accepted/tizen/mobile/20160429.011805 accepted/tizen/tv/20160429.011725 accepted/tizen/wearable/20160429.011731 submit/tizen/20160428.152642
Karol Lewandowski [Thu, 28 Apr 2016 12:06:38 +0000 (14:06 +0200)]
Initialize policy database based on bus path

Currently library has no reliable way of determining which path was
already opened by libdbus/glib when only bus type is given.

This commit changes API to allow client libraries pass bus path directly
eliminating possible ambiguities.

Change-Id: I732c391898f661b923fa61d4a2aebb402fb0ec3c

8 years agoJanitorial: use snprintf() for string operations 35/67635/2 accepted/tizen/common/20160428.144320 accepted/tizen/ivi/20160428.003159 accepted/tizen/mobile/20160428.005122 accepted/tizen/tv/20160428.003007 accepted/tizen/wearable/20160428.003329 submit/submit.001/20160427.185628 submit/tizen/20160427.185759
Karol Lewandowski [Wed, 27 Apr 2016 14:03:03 +0000 (16:03 +0200)]
Janitorial: use snprintf() for string operations

snprintf() guarantees terminating \0 byte for given
size.

Change-Id: I65cb90ea4466d0356cc02919d269da8843a7302f

8 years agoFix: ensure Smack label is null terminated in internal representation 34/67634/2
Karol Lewandowski [Wed, 27 Apr 2016 14:00:32 +0000 (16:00 +0200)]
Fix: ensure Smack label is null terminated in internal representation

Change-Id: Ifbb8d651b407111668ba61d1e279938fb6509589

8 years agoFix: do not call get(pw/gr)uid on uninitialized memory 29/67629/2
Karol Lewandowski [Wed, 27 Apr 2016 13:18:47 +0000 (15:18 +0200)]
Fix: do not call get(pw/gr)uid on uninitialized memory

This commit fixes bug introduced in commit 869f3003 ("Fix: close file
descriptior leak in dbuspolicy_init error path").

Change-Id: Ieec0fdb4b23a014f25c20aecb731ff2e14a8864a

8 years agodbuspolicy: fix initialization 50/67450/1 accepted/tizen/common/20160427.144255 submit/tizen/20160427.075756
Karol Lewandowski [Tue, 26 Apr 2016 13:05:09 +0000 (15:05 +0200)]
dbuspolicy: fix initialization

Change-Id: Ib904512ef25e3da70f784dcd3662f0afd272e3c8

8 years agoFix: properly check getgrgid_r() and getpwuid_r() function results 74/67174/1 accepted/tizen/common/20160425.145243 accepted/tizen/ivi/20160425.140133 accepted/tizen/mobile/20160425.135726 accepted/tizen/tv/20160425.135843 accepted/tizen/wearable/20160425.135929 submit/tizen/20160425.120058
Lukasz Skalski [Mon, 25 Apr 2016 11:35:24 +0000 (13:35 +0200)]
Fix: properly check getgrgid_r() and getpwuid_r() function results

Change-Id: I3c780f9067d1b4aca2a0bc40f6ff2d2a1adf0347

8 years agosvace:delete double free 28/66628/1 accepted/tizen/common/20160420.141412 accepted/tizen/ivi/20160421.010333 accepted/tizen/mobile/20160421.010313 accepted/tizen/tv/20160421.010330 accepted/tizen/wearable/20160421.010345 submit/tizen/20160420.034421
sanghyeok.oh [Wed, 20 Apr 2016 03:41:48 +0000 (12:41 +0900)]
svace:delete double free

Change-Id: Ieeeef6057ec005206d9d4d29f7ce682f991e13b4
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
8 years agorefactor: drop unused variable 47/65347/2 accepted/tizen/common/20160408.190430 accepted/tizen/ivi/20160411.005605 accepted/tizen/mobile/20160411.005638 accepted/tizen/tv/20160411.005523 accepted/tizen/wearable/20160411.005547 submit/tizen/20160408.161138
Karol Lewandowski [Fri, 8 Apr 2016 13:04:59 +0000 (15:04 +0200)]
refactor: drop unused variable

Change-Id: I7069cabbf73110823eb7ae2a8806405fdb278d56

8 years agopackaging: Do not strip binaries on install 46/65346/2
Karol Lewandowski [Fri, 8 Apr 2016 13:04:27 +0000 (15:04 +0200)]
packaging: Do not strip binaries on install

Having debug info will allow debug information to be extracted and placed
into separate .debug{info,source} packages automatically.

Change-Id: I64d7dd1468c58a32fdb9d978f07547e3fc65fd18

8 years agoChange default configuration files as used from dbus-1.10 79/65179/1
Karol Lewandowski [Thu, 7 Apr 2016 15:51:46 +0000 (17:51 +0200)]
Change default configuration files as used from dbus-1.10

Change-Id: Ib986f757efe923b7c2003d89fbcbfe15370f1ba7

8 years agoFix: close file descriptior leak in dbuspolicy_init error path 00/65000/2
Karol Lewandowski [Wed, 6 Apr 2016 14:29:47 +0000 (16:29 +0200)]
Fix: close file descriptior leak in dbuspolicy_init error path

Refactor initialization to be able to provide error handling
easily.

Change-Id: Ibe69e8894b93590e21b3c37b6d08cb394bce6b1b

8 years agoFix: remove errnous printing to stdout (stderr) 99/64999/2
Karol Lewandowski [Wed, 6 Apr 2016 14:19:51 +0000 (16:19 +0200)]
Fix: remove errnous printing to stdout (stderr)

Not acceptable for library code.

Change-Id: Ife043c9e38d4ddc36f2b2a68ca5a4d52e748f8c3

8 years agoAdded two prioritized configuration file paths, primary and secondary 44/59944/2 accepted/tizen/common/20160406.143837 accepted/tizen/ivi/20160406.014808 accepted/tizen/mobile/20160406.014712 accepted/tizen/tv/20160406.014733 accepted/tizen/wearable/20160406.014754 submit/tizen/20160405.144419
Arek Antoniak [Fri, 19 Feb 2016 14:17:44 +0000 (15:17 +0100)]
Added two prioritized configuration file paths, primary and secondary

Change-Id: I9608d089019ce58208b8e1ead304ae353ebd31c0

8 years agolibdbuspolicy:svace 69/63969/1 accepted/tizen/common/20160329.143020 accepted/tizen/ivi/20160329.080911 accepted/tizen/mobile/20160329.080808 accepted/tizen/tv/20160329.080827 accepted/tizen/wearable/20160329.080846 submit/tizen/20160329.060024
sanghyeok.oh [Tue, 29 Mar 2016 05:57:32 +0000 (14:57 +0900)]
libdbuspolicy:svace

Change-Id: I3bce387ce6d97483a90bdda41025bf1e3e753bb7
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
8 years agolibdbuspolicy:svace 61/63461/1 accepted/tizen/common/20160325.135750 accepted/tizen/common/20160329.050611 accepted/tizen/ivi/20160328.071123 accepted/tizen/mobile/20160328.070947 accepted/tizen/tv/20160328.071017 accepted/tizen/wearable/20160328.071052 submit/tizen/20160324.061902 submit/tizen/20160325.052221 submit/tizen/20160328.051736
sanghyeok.oh [Thu, 24 Mar 2016 06:17:38 +0000 (15:17 +0900)]
libdbuspolicy:svace

Change-Id: If853b56a78ea6b14829fbdc9f6708329a7f52936
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
8 years agolibdbuspolicy:svace 06/62806/1 accepted/tizen/common/20160318.150325 accepted/tizen/ivi/20160321.004932 accepted/tizen/mobile/20160321.004840 accepted/tizen/tv/20160321.004856 accepted/tizen/wearable/20160321.004912 submit/tizen/20160318.110014
Kazimierz Krosman [Fri, 18 Mar 2016 10:38:29 +0000 (11:38 +0100)]
libdbuspolicy:svace

Change-Id: Ibb899e8d6a56b99343ffe2d7b7f427b179b863f1

8 years agolibdbuspolicy:svace 44/62644/1 accepted/tizen/ivi/20160318.114052 accepted/tizen/mobile/20160318.114023 accepted/tizen/tv/20160318.114042 accepted/tizen/wearable/20160318.114037 submit/tizen/20160318.082301
sanghyeok.oh [Thu, 17 Mar 2016 08:03:49 +0000 (17:03 +0900)]
libdbuspolicy:svace

Change-Id: I443ae46a8f1e8e3de55982576a58be1f67410a78
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
8 years agolibdbuspolicy:SVACE 73/62273/2 accepted/tizen/common/20160317.161202 accepted/tizen/ivi/20160318.113241 accepted/tizen/mobile/20160318.112931 accepted/tizen/tv/20160318.113058 accepted/tizen/wearable/20160318.113108 submit/tizen/20160317.071423
sanghyeok.oh [Tue, 15 Mar 2016 07:00:18 +0000 (16:00 +0900)]
libdbuspolicy:SVACE

Change-Id: Ibc20b589385c92397a9a27baacba6bcd12c0ae03
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
8 years agoFix Require dependency in spec file 99/61199/3 accepted/tizen/common/20160311.203922 accepted/tizen/ivi/20160311.150408 accepted/tizen/mobile/20160311.143403 accepted/tizen/tv/20160311.144933 accepted/tizen/wearable/20160311.145750 submit/tizen/20160311.095507
Kazimierz Krosman [Fri, 4 Mar 2016 14:29:51 +0000 (15:29 +0100)]
Fix Require dependency in spec file

Added devel package for libdbuspolicy

Change-Id: I60690ded104f1c766866bb1e11fd9c73cd11e0e5

8 years agoFix: get kdbus_creds when there is only unique_id 12/58912/2
Kazimierz Krosman [Thu, 4 Feb 2016 16:42:51 +0000 (17:42 +0100)]
Fix: get kdbus_creds when there is only unique_id

Change-Id: I7200fa5bb5bbe9cd926fb7021bb3bbe57e24d51f

8 years agoBugfix for 'own_prefix' support - changed obfuscation scheme 82/58882/3
Arek Antoniak [Thu, 4 Feb 2016 11:37:04 +0000 (12:37 +0100)]
Bugfix for 'own_prefix' support - changed obfuscation scheme

Change-Id: I18fc0d543dc7c0f2ed548771c755c5878c8a7837

8 years agoFix: not calling can_send when sender or dest="" 69/58869/3
Kazimierz Krosman [Wed, 3 Feb 2016 16:18:20 +0000 (17:18 +0100)]
Fix: not calling can_send when sender or dest=""

Change-Id: I27bb2d1bb76c5536757c5d0cb9441722adabbc4a

8 years agoFix: double-free in case of NULL sender 64/58664/1
Adrian Szyndela [Tue, 2 Feb 2016 14:11:27 +0000 (15:11 +0100)]
Fix: double-free in case of NULL sender

Change-Id: Ibc4f218979b7969ecfd8c5a3e6122124ff2ddf03

8 years agoAdd manifest file 45/57045/1 accepted/tizen/ivi/20160218.023900 accepted/tizen/mobile/20160203.102402 accepted/tizen/tv/20160203.102428 accepted/tizen/wearable/20160203.102449 submit/tizen/20160203.060635 submit/tizen_common/20160218.142243 submit/tizen_ivi/20160217.000000 submit/tizen_ivi/20160217.000003
Lukasz Skalski [Thu, 14 Jan 2016 16:12:02 +0000 (17:12 +0100)]
Add manifest file

Change-Id: I4be84c8f70c4dc663767d449da146522c1598f48

8 years agoPatch for 'own_prefix' support, logging enabling, init timeout 23/57023/1
Arek Antoniak [Thu, 14 Jan 2016 10:57:11 +0000 (11:57 +0100)]
Patch for 'own_prefix' support, logging enabling, init timeout

Change-Id: I63edf55513a3471c90967d415ab654647b1fb822

8 years agoAdd kdbus interface header 32/54132/5
Arek Antoniak [Fri, 11 Dec 2015 14:23:39 +0000 (15:23 +0100)]
Add kdbus interface header

Change-Id: I28578a05b019726323fbbd9a35c0fb80284a6b8c

8 years agoAdd libdbuspolicy library 31/54131/4
Arek Antoniak [Fri, 11 Dec 2015 14:23:27 +0000 (15:23 +0100)]
Add libdbuspolicy library

Library implements dbus-daemon policy checking logic as standalone
library, it complies with dbus-daemon policy specification and supports
Tizen's Cynara extensions ("check" tag).

libdbuspolicy uses kdbus directly to gain peer credentials.

Authors:
    Kazimierz Krosman <k.krosman@samsung.com>
    Arek Antoniak <a.antoniak2@samsung.com>

Change-Id: I7e637000a90b4194350b69d460ddb0da2b02b983

8 years agoInitial empty repository master
KyungMi Lee [Wed, 2 Dec 2015 23:41:10 +0000 (15:41 -0800)]
Initial empty repository