From 800b3e1adfe4c5f6bdcc74267cb80fdc02016bca Mon Sep 17 00:00:00 2001 From: "jooseong.lee" Date: Wed, 14 May 2014 18:44:08 +0900 Subject: [PATCH] Modification about smack label of db file belong to process. [Problem] Most db files have 'floor' label. Because these are created during image creation time. Therefore no process can write the dbs (since 'floor' label allows only read and execute) [Solution] Modify smack label of the db files based on condition below referring three domain model Condition1. Assign domain of process which creates db files Condition2. Assign domain of process accesses db files. Change-Id: I7538593b434e3e8a07696c12f441cbd444a31d16 Signed-off-by: jooseong.lee --- tool/pkg_initdb.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tool/pkg_initdb.c b/tool/pkg_initdb.c index 9da565e..aec8faa 100755 --- a/tool/pkg_initdb.c +++ b/tool/pkg_initdb.c @@ -47,7 +47,7 @@ #define PKG_PARSER_DB_FILE_JOURNAL tzplatform_mkpath(TZ_SYS_DB, ".pkgmgr_parser.db-journal") #define PKG_CERT_DB_FILE tzplatform_mkpath(TZ_SYS_DB, ".pkgmgr_cert.db") #define PKG_CERT_DB_FILE_JOURNAL tzplatform_mkpath(TZ_SYS_DB, ".pkgmgr_cert.db-journal") -#define PKG_INFO_DB_LABEL "pkgmgr::db" +#define PKG_INFO_DB_LABEL "User" #ifdef _E #undef _E @@ -266,7 +266,6 @@ int main(int argc, char *argv[]) return -1; } -/* const char *argv_parser[] = { "/usr/bin/chsmack", "-a", PKG_INFO_DB_LABEL, PKG_PARSER_DB_FILE, NULL }; initdb_xsystem(argv_parser); const char *argv_parserjn[] = { "/usr/bin/chsmack", "-a", PKG_INFO_DB_LABEL, PKG_PARSER_DB_FILE_JOURNAL, NULL }; @@ -275,8 +274,6 @@ int main(int argc, char *argv[]) initdb_xsystem(argv_cert); const char *argv_certjn[] = { "/usr/bin/chsmack", "-a", PKG_INFO_DB_LABEL, PKG_CERT_DB_FILE_JOURNAL, NULL }; initdb_xsystem(argv_certjn); -*/ + return 0; } - - -- 2.7.4