From: Zofia Abramowska Date: Thu, 6 Oct 2016 12:12:45 +0000 (+0200) Subject: SM : Add transmute and exec params to check_path X-Git-Tag: security-manager_5.5_testing~20^2~36 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=07227258df103b72569fc0eb1602bcf323de907c;p=platform%2Fcore%2Ftest%2Fsecurity-tests.git SM : Add transmute and exec params to check_path Change-Id: Ie779b3e36bc815cd2c2dc46b0c9cd0ab50be9428 --- diff --git a/src/security-manager-tests/common/sm_commons.cpp b/src/security-manager-tests/common/sm_commons.cpp index 55dd522..f261ceb 100644 --- a/src/security-manager-tests/common/sm_commons.cpp +++ b/src/security-manager-tests/common/sm_commons.cpp @@ -314,10 +314,10 @@ void check_app_after_install(const std::string &app_id, const std::string &pkg_i check_app_gids(app_id, allowed_gids); } -void check_path(const std::string &path, const std::string &label) { +void check_path(const std::string &path, const std::string &label, bool transmute, bool execute) { nftw_expected_label = label; - nftw_expected_transmute = true; - nftw_expected_exec = false; + nftw_expected_transmute = transmute; + nftw_expected_exec = execute; // check labels int result = nftw(path.c_str(), &nftw_check_sm_labels, FTW_MAX_FDS, FTW_PHYS); diff --git a/src/security-manager-tests/common/sm_commons.h b/src/security-manager-tests/common/sm_commons.h index 1f9d0da..5466b21 100644 --- a/src/security-manager-tests/common/sm_commons.h +++ b/src/security-manager-tests/common/sm_commons.h @@ -70,7 +70,8 @@ void check_app_after_install(const std::string &app_id, const std::string &pkg_i const privileges_t &denied_privs, const std::vector &allowed_groups, bool isHybrid = false); -void check_path(const std::string &path, const std::string &label); +void check_path(const std::string &path, const std::string &label, + bool transmute = true, bool execute = false); void check_app_path_after_install(int app_num, const char *pkgId, bool others_enabled=false); void check_app_after_uninstall(const std::string &app_id, const std::string &pkg_id, const bool is_pkg_removed);