}
}
+std::string PolicyConfiguration::getPkgRulesFilePath() {
+ return CONF_DIR "pkg-rules-template.smack";
+}
+std::string PolicyConfiguration::getAppRulesFilePath() {
+ return CONF_DIR "app-rules-template.smack";
+}
+
} // namespace SecurityManagerTest
GroupVector privToGroup(const PrivVector &privVector);
GidVector groupToGid(const GroupVector &groupVector);
-static bool getIsAskuserEnabled();
+ static bool getIsAskuserEnabled();
+ static std::string getPkgRulesFilePath();
+ static std::string getAppRulesFilePath();
private:
UserDescription loadUserDescription(UserType userType);
using namespace SecurityManagerTest;
-#define CONF_DIR "/usr/share/security-manager/policy/"
#define SMACK_RULES_PATH "/sys/fs/smackfs/load2"
#define ALLOW 0
bool isHybrid = false)
{
static const std::vector<AccessRequest> rules[] =
- {parseSmackRulesFile(CONF_DIR "pkg-rules-template.smack"),
- parseSmackRulesFile(CONF_DIR "app-rules-template.smack")};
+ {parseSmackRulesFile(PolicyConfiguration::getPkgRulesFilePath()),
+ parseSmackRulesFile(PolicyConfiguration::getAppRulesFilePath())};
const std::pair<std::string, std::string> switchAliases[] =
{std::make_pair("~PATH_RW~", generatePathRWLabel(pkgId)),