/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2016-2020 Samsung Electronics Co., Ltd. All rights reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
typedef std::vector<gid_t> GidVector;
typedef std::vector<std::string> GroupVector;
typedef std::vector<std::string> PrivVector;
+ typedef std::map<std::string, std::string> PrivGroupMap;
struct UserDescription {
PrivVector privVector;
GroupVector getGroup();
UserDescription& getUserDescription(UserType userType);
gid_t groupToGid(const std::string &gname);
+ PrivGroupMap getPrivGroupMap();
+ PrivVector getSystemdManagedPrivs();
+ 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:
- GidVector groupToGid(const GroupVector &groupVector);
UserDescription loadUserDescription(UserType userType);
PrivVector loadPrivFile(const std::string &path);
- GroupVector privToGroup(const PrivVector &privVector);
void loadPrivGroupMap(void);
- std::map<std::string, std::string> m_privGroupMap;
+ PrivGroupMap m_privGroupMap;
std::map<std::string, gid_t> m_groupGidMap;
std::map<UserType, UserDescription> m_userDescriptionMap;
};