aboutsummaryrefslogtreecommitdiffstats
path: root/src/secmgr-wrap.c
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2020-07-10 13:18:47 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2020-07-10 13:34:01 +0200
commit5b9231c2c8266317081d98f38041105a0ef87e84 (patch)
treefc9189c89fb9709e19f70657a398d5bc18dc0a4e /src/secmgr-wrap.c
parent7084f123b4f8a704ae2bc35b5fe9433f767439fe (diff)
Before that change any application could browse content of other application. This change fixes that unintended behaviour by setting the installed files as private to the application. This affects the Smack labels of the files that after the change become the label of the application. Bug-AGL: SPEC-3489 Change-Id: I933446a8c155a03d9b66767f1dda63aeaeb21eb1 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/secmgr-wrap.c')
-rw-r--r--src/secmgr-wrap.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/secmgr-wrap.c b/src/secmgr-wrap.c
index 63704ef..83a2660 100644
--- a/src/secmgr-wrap.c
+++ b/src/secmgr-wrap.c
@@ -117,7 +117,7 @@ static int addpath(const char *pathname, enum app_install_path_type type)
int secmgr_path_public_read_only(const char *pathname)
{
- return addpath(pathname, SECURITY_MANAGER_PATH_RO);
+ return addpath(pathname, SECURITY_MANAGER_PATH_PUBLIC_RO);
}
int secmgr_path_read_only(const char *pathname)
@@ -130,6 +130,11 @@ int secmgr_path_read_write(const char *pathname)
return addpath(pathname, SECURITY_MANAGER_PATH_RW);
}
+int secmgr_path_private(const char *pathname)
+{
+ return addpath(pathname, SECURITY_MANAGER_PATH_PRIVATE);
+}
+
int secmgr_prepare_exec(const char *appid)
{
return retcode(security_manager_prepare_app(appid));