[Release] wrt_0.8.166 for tizen_2.1 branch
[platform/framework/web/wrt.git] / src / wrt-launchpad-daemon / include / access_control.h
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  *        http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 #ifndef __ACCESS_CONTROL_H_
18 #define __ACCESS_CONTROL_H_
19
20 #ifdef DAC_ACTIVATE
21
22 #include <privilege-control.h>
23
24 #define INHOUSE_UID     5000
25 static inline int __set_access(const char* pkg_name,
26                                const char* pkg_type,
27                                const char* app_path)
28 {
29     return set_app_privilege(pkg_name, pkg_type, app_path);
30 }
31
32 #else
33
34 static inline int __set_access(const char* pkg_name,
35                                const char* pkg_type,
36                                const char* app_path)
37 {
38     return 0;
39 }
40
41 #endif
42
43 #endif //__ACCESS_CONTROL_H_
44