platform/core/system/libdbuspolicy.git
7 years agoFix: wrong data preparation for policy requests 42/85942/2
Kazimierz Krosman [Fri, 26 Aug 2016 13:39:47 +0000 (15:39 +0200)]
Fix: wrong data preparation for policy requests

Additional Fix: wrong assertion (name validation)

Change-Id: I79fa2bc27f8a8406f067bc7e4299bdc422c79b37

7 years agoRevert "revert changes:revert commit id dc3048a8de00c01514c14ef465a87b8ca9a7c704" 41/85941/1
Kazimierz Krosman [Mon, 29 Aug 2016 11:05:05 +0000 (13:05 +0200)]
Revert "revert changes:revert commit id dc3048a8de00c01514c14ef465a87b8ca9a7c704"

This reverts commit 1b4d4f2311ae31440417fafd3233177d39bfd768.

This revert is not nessesary- it requiers only simple fix.

Change-Id: I4591012edd0d039b1eb7bb382cf0b34b8e5e6771

7 years agorevert changes:revert commit id dc3048a8de00c01514c14ef465a87b8ca9a7c704 71/85771/2 accepted/tizen/common/20160829.140206 accepted/tizen/ivi/20160829.232653 accepted/tizen/mobile/20160829.232602 accepted/tizen/tv/20160829.232611 accepted/tizen/wearable/20160829.232635 submit/tizen/20160829.055144
sanghyeok.oh [Mon, 29 Aug 2016 05:03:54 +0000 (14:03 +0900)]
revert changes:revert commit id dc3048a8de00c01514c14ef465a87b8ca9a7c704

previous submit has bug, and revert it
"Prefix tree search for ownership rules, removed virtual methods."
id : dc3048a8de00c01514c14ef465a87b8ca9a7c704

Change-Id: I0a73eab24c95f1a6cc3a4e37a9ffb0d2da943e3f
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
7 years agoFix: enable libdbuspolicy for multiple init. 29/85329/2
Kazimierz Krosman [Wed, 24 Aug 2016 14:48:55 +0000 (16:48 +0200)]
Fix: enable libdbuspolicy for multiple init.

Change-Id: I5ffea43051cb5bd51320333fde273815e12801ae

7 years agoMerge "Fixes coding style issues." into tizen
Karol Lewandowski [Tue, 23 Aug 2016 10:38:22 +0000 (03:38 -0700)]
Merge "Fixes coding style issues." into tizen

7 years agoMerge "Prefix tree search for ownership rules, removed virtual methods." into tizen
Karol Lewandowski [Tue, 23 Aug 2016 10:38:13 +0000 (03:38 -0700)]
Merge "Prefix tree search for ownership rules, removed virtual methods." into tizen

7 years agoFixes coding style issues. 11/85011/1
Krystian Kisielak [Tue, 23 Aug 2016 08:44:34 +0000 (10:44 +0200)]
Fixes coding style issues.

Change-Id: Ibbbaab71538906fa123156c3260707b9edef4bcc
Signed-off-by: Krystian Kisielak <k.kisielak@samsung.com>
7 years agobug fix:wrong index of kdbus_unique_id 49/84949/1
sanghyeok.oh [Tue, 23 Aug 2016 03:00:30 +0000 (12:00 +0900)]
bug fix:wrong index of kdbus_unique_id

Change-Id: I374bf3de298adf49d67e48b199590a1aa164d0a5
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
7 years agokdbus_unique_id fix 99/84799/1 accepted/tizen/common/20160822.132920 accepted/tizen/ivi/20160822.232755 accepted/tizen/mobile/20160822.232703 accepted/tizen/tv/20160822.232720 accepted/tizen/wearable/20160822.232737 submit/tizen/20160822.114411
Konrad Lipinski [Mon, 22 Aug 2016 11:19:38 +0000 (13:19 +0200)]
kdbus_unique_id fix

Change-Id: Ice25972fdc38e032f8d06ccb66eec8e3f202337a

7 years agoPrefix tree search for ownership rules, removed virtual methods. 19/80619/14
Krystian Kisielak [Fri, 10 Jun 2016 10:01:59 +0000 (12:01 +0200)]
Prefix tree search for ownership rules, removed virtual methods.

Change-Id: I90909b035da16dce39ac28278c1561eca0396335
Signed-off-by: Krystian Kisielak <k.kisielak@samsung.com>
7 years agokdbus: synchronize kdbus interface header between repositories 81/83681/3 accepted/tizen/common/20160812.141311 accepted/tizen/ivi/20160815.233632 accepted/tizen/mobile/20160815.233544 accepted/tizen/tv/20160815.233556 accepted/tizen/wearable/20160815.233613 submit/tizen/20160812.121107
Karol Lewandowski [Fri, 12 Aug 2016 09:51:05 +0000 (11:51 +0200)]
kdbus: synchronize kdbus interface header between repositories

Change-Id: I8e47edf8c61699a99523dead09bb3ef321894d31

7 years agoChange in API to return internal errors by libdbuspolicy 80/83380/2
Kazimierz Krosman [Wed, 10 Aug 2016 11:02:04 +0000 (13:02 +0200)]
Change in API to return internal errors by libdbuspolicy

Libdbuspolicy now returns error codes via main API
(check_out and check_int functions):
DBUSPOLICY_RESULT_ALLOW 1
DBUSPOLICY_RESULT_DENY 0
DBUSPOLICY_RESULT_DEST_NOT_AVAILABLE -1
DBUSPOLICY_RESULT_KDBUS_ERROR -2
DBUSPOLICY_RESULT_CYNARA_ERROR -3

it is needed by gdbus and libdbus to make better descripted logs.

Change-Id: I060de3ec0a767ee56dfd5ae8f6aa4475dd25ffa4

8 years agoMerge "Fix copying to empty string." into tizen accepted/tizen/common/20160725.153515 accepted/tizen/ivi/20160725.064756 accepted/tizen/mobile/20160725.064727 accepted/tizen/tv/20160725.064748 accepted/tizen/wearable/20160725.064750 submit/tizen/20160725.024306
INSUN PYO [Mon, 25 Jul 2016 02:38:09 +0000 (19:38 -0700)]
Merge "Fix copying to empty string." into tizen

8 years agoFix copying to empty string. 88/81188/1
Krystian Kisielak [Fri, 22 Jul 2016 13:23:09 +0000 (15:23 +0200)]
Fix copying to empty string.

Change-Id: I0d2e111372cbe62fc3ebe9b4211e90b89a335dbf

8 years agoMerge "Added test description to make test better described" into tizen
Karol Lewandowski [Fri, 22 Jul 2016 13:02:02 +0000 (06:02 -0700)]
Merge "Added test description to make test better described" into tizen

8 years agoadd LICENSE.APACHE2.0 77/80177/1 accepted/tizen/common/20160715.080051 accepted/tizen/ivi/20160715.075317 accepted/tizen/mobile/20160715.075222 accepted/tizen/tv/20160715.075240 accepted/tizen/wearable/20160715.075254 submit/tizen/20160715.052105
Hyotaek Shim [Fri, 15 Jul 2016 05:20:13 +0000 (14:20 +0900)]
add LICENSE.APACHE2.0

Change-Id: Icb8da89c7d0413a6b2bdb79cb59cb75edb9f9b5c

8 years agoAdded test description to make test better described 97/72597/3
Kazimierz Krosman [Wed, 1 Jun 2016 17:06:14 +0000 (19:06 +0200)]
Added test description to make test better described

Change-Id: I90909b035da16dce39ac28278c1561ecf0396335

8 years agosvace 62/74462/1 accepted/tizen/common/20160616.151834 accepted/tizen/ivi/20160616.105231 accepted/tizen/mobile/20160616.105143 accepted/tizen/tv/20160616.105202 accepted/tizen/wearable/20160616.105218 submit/tizen/20160616.032706
sanghyeok.oh [Tue, 14 Jun 2016 09:04:05 +0000 (18:04 +0900)]
svace

Change-Id: I745773662dc8578fce7590bd1b3bc2bde3ede5ed
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
8 years agoFix: xml parser + minor fixes 05/72105/1 accepted/tizen/common/20160531.141928 accepted/tizen/ivi/20160602.022635 accepted/tizen/mobile/20160602.022712 accepted/tizen/tv/20160602.022350 accepted/tizen/wearable/20160602.022500 submit/tizen/20160530.143459
Kazimierz Krosman [Mon, 30 May 2016 13:43:01 +0000 (15:43 +0200)]
Fix: xml parser + minor fixes

Fixed xml parser bug that causes that only first <includedir>
works as it should.

Removed deadlock in init when logs are enabled

Minor refactors

Change-Id: I94c97efff478cf919cc5809f106bca1bb1465889

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