Added APP_PATH_PUBLIC and APP_PATH_FLOOR types to perm_app_setup_path function. 64/19164/6
authorSebastian Grabowski <s.grabowski@samsung.com>
Thu, 8 May 2014 07:26:28 +0000 (09:26 +0200)
committerMarcin Niesluchowski <m.niesluchow@samsung.com>
Tue, 13 May 2014 06:42:56 +0000 (23:42 -0700)
commit82de3072bd07348fcbe849ce0e2031ab17539b33
tree96aa65c315b9b981b2a2395010f1e8726d0f4212
parent0f97a465f2ff62e2923e80bf3888c7b8a09bbfe6
Added APP_PATH_PUBLIC and APP_PATH_FLOOR types to perm_app_setup_path function.

Current functionality of perm_app_setup_path is not fully compatibile
with how Smack policy should look like in Tizen 3. For better
compatibility new APP_PATH_PUBLIC type has been added and implementation
of APP_PATH_GROUP_RW, APP_PATH_PUBLIC_RO and APP_PATH_SETTINGS_RW has
been changed to work exactly as APP_PATH_PUBLIC.
Moreover, APP_PATH_FLOOR type has been added that should be used to
label files and directories with "_" (floor) label. This label should be
used from now instead of APP_PATH_ANY_LABEL. APP_PATH_ANY_LABEL is still
supported but it behaves like APP_PATH_FLOOR - it just is for API
compatibility reasons.

Removed all path related tables, views, indexes etc. and code as well.

Verification may be done with the following:
security-tests.sh libprivilege-control --runignored --output=text
sqlite3 /opt/dbspace/.rules-db.db3 ".schema" | grep path
However, some test cases must be rewritten after this patch is accepted.

Change-Id: I6019ba67aa2d032acdee05a2e5c98f2dd6895fb3
Signed-off-by: Sebastian Grabowski <s.grabowski@samsung.com>
12 files changed:
db/rules-db-data.sql
db/rules-db.sql
db/updates/update-rules-db-data-to-v4.sql [new file with mode: 0644]
db/updates/update-rules-db-to-v4.sql [new file with mode: 0644]
include/common.h
include/privilege-control.h
include/rules-db-internals.h
include/rules-db.h
src/common.c
src/privilege-control.c
src/rules-db-internals.c
src/rules-db.c