SM: Rename and use one label generators
[platform/core/test/security-tests.git] / src / security-manager-tests / common / sm_commons.cpp
index 53013d4..31cf3e2 100644 (file)
@@ -65,12 +65,12 @@ const std::string uidToStr(const uid_t uid)
 
 // Common implementation details
 
-std::string generateAppLabel(const std::string &appId)
+std::string generateProcessLabel(const std::string &appId)
 {
     return "User::App::" + appId;
 }
 
-std::string generatePkgLabel(const std::string &pkgId)
+std::string generatePathRWLabel(const std::string &pkgId)
 {
     return "User::Pkg::" + pkgId;
 }
@@ -217,7 +217,7 @@ void check_app_permissions(const char *const app_id, const char *const pkg_id,
                            const privileges_t &denied_privs)
 {
     (void) pkg_id;
-    std::string smackLabel = generateAppLabel(app_id);
+    std::string smackLabel = generateProcessLabel(app_id);
 
     CynaraTestClient::Client ctc;
 
@@ -313,14 +313,14 @@ void check_app_path_after_install(int app_num, const char *pkgId, bool others_en
     std::string SM_PUBLIC_RO_PATH = genPublicROPath(app_num);
     int result;
 
-    nftw_expected_label = generatePkgLabel(pkgId);
+    nftw_expected_label = generatePathRWLabel(pkgId);
     nftw_expected_transmute = true;
     nftw_expected_exec = false;
 
     result = nftw(SM_RW_PATH.c_str(), &nftw_check_sm_labels, FTW_MAX_FDS, FTW_PHYS);
     RUNNER_ASSERT_MSG(result == 0, "Unable to check Smack labels for " << SM_RW_PATH);
 
-    nftw_expected_label = generatePkgLabel(pkgId) + "::RO";
+    nftw_expected_label = generatePathRWLabel(pkgId) + "::RO";
     nftw_expected_transmute = false;
     nftw_expected_exec = false;