From 07227258df103b72569fc0eb1602bcf323de907c Mon Sep 17 00:00:00 2001 From: Zofia Abramowska Date: Thu, 6 Oct 2016 14:12:45 +0200 Subject: [PATCH] SM : Add transmute and exec params to check_path Change-Id: Ie779b3e36bc815cd2c2dc46b0c9cd0ab50be9428 --- src/security-manager-tests/common/sm_commons.cpp | 6 +++--- src/security-manager-tests/common/sm_commons.h | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) 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); -- 2.7.4