2 * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License
18 * @author Bartlomiej Grzelewski (b.grzelewski@samsung.com)
23 #include <process-settings/policy.h>
24 #include <process-settings/executor.h>
25 #include <process-settings/change-uid.h>
26 #include <process-settings/change-smack.h>
27 #include <process-settings/install-app.h>
28 #include <process-settings/create-user.h>
30 class CKMPolicy : public ProcessSettings::Policy {
35 ProcessSettings::PrivilegeVector priv);
36 virtual std::string GetUserName() const;
37 virtual void SetUserName(std::string);
38 virtual gid_t GetGid() const;
39 virtual void SetGid(gid_t);
40 virtual uid_t GetUid() const;
41 virtual void SetUid(uid_t);
42 virtual std::string GetSmackLabel() const;
43 virtual void SetSmackLabel(std::string);
44 virtual std::string GetAppId() const;
45 virtual void SetAppId(std::string);
46 virtual std::string GetPkgId() const;
47 virtual void SetPkgId(std::string);
48 virtual ProcessSettings::PrivilegeVector GetPrivileges() const;
49 virtual void SetPrivileges(ProcessSettings::PrivilegeVector);
50 virtual ~CKMPolicy() {}
54 std::string m_userName;
55 std::string m_smackLabel;
58 ProcessSettings::PrivilegeVector m_privileges;
61 extern const ProcessSettings::PrivilegeVector PrivNone;
62 extern const ProcessSettings::PrivilegeVector PrivCKMBoth;
63 extern const ProcessSettings::PrivilegeVector PrivCKMControl;
64 extern const ProcessSettings::PrivilegeVector PrivCKMStore;