5c219ac3f5e7fc955649673fed55a006a78868a8
[platform/core/security/security-server.git] / src / server / common / protocols.cpp
1 /*
2  *  Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  *  Contact: Bumjin Im <bj.im@samsung.com>
5  *
6  *  Licensed under the Apache License, Version 2.0 (the "License");
7  *  you may not use this file except in compliance with the License.
8  *  You may obtain a copy of the License at
9  *
10  *      http://www.apache.org/licenses/LICENSE-2.0
11  *
12  *  Unless required by applicable law or agreed to in writing, software
13  *  distributed under the License is distributed on an "AS IS" BASIS,
14  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  *  See the License for the specific language governing permissions and
16  *  limitations under the License
17  */
18 /*
19  * @file        protocols.cpp
20  * @author      Bartlomiej Grzelewski (b.grzelewski@samsung.com)
21  * @version     1.0
22  * @brief       List of all protocols supported by security server.
23  */
24
25 #include <protocols.h>
26 #include <cstddef>
27
28 namespace SecurityServer {
29
30 char const * const SERVICE_SOCKET_SHARED_MEMORY =
31     "/tmp/.security-server-api-data-share.sock";
32 char const * const SERVICE_SOCKET_GET_GID =
33     "/tmp/.security-server-api-get-gid.sock";
34 char const * const SERVICE_SOCKET_PRIVILEGE_BY_PID =
35     "/tmp/.security-server-api-privilege-by-pid.sock";
36 char const * const SERVICE_SOCKET_APP_PERMISSIONS =
37     "/tmp/.security-server-api-app-permissions.sock";
38 char const * const SERVICE_SOCKET_APP_PRIVILEGE_BY_NAME =
39     "/tmp/.security-server-api-app-privilege-by-name.sock";
40 char const * const SERVICE_SOCKET_COOKIE_GET =
41     "/tmp/.security-server-api-cookie-get.sock";
42 char const * const SERVICE_SOCKET_COOKIE_CHECK =
43     "/tmp/.security-server-api-cookie-check.sock";
44 //TODO: Merge bellow socket with the one above. This should be done
45 //after security-server-api-cookie-check.sock will be protected by smack and has proper label
46 char const * const SERVICE_SOCKET_COOKIE_CHECK_TMP =
47     "/tmp/.security-server-api-cookie-check-tmp.sock";
48 char const * const SERVICE_SOCKET_OPEN_FOR =
49     "/tmp/.security-server-api-open-for.sock";
50 char const * const SERVICE_SOCKET_PASSWD_CHECK =
51     "/tmp/.security-server-api-password-check.sock";
52 char const * const SERVICE_SOCKET_PASSWD_SET =
53     "/tmp/.security-server-api-password-set.sock";
54 char const * const SERVICE_SOCKET_PASSWD_RESET =
55     "/tmp/.security-server-api-password-reset.sock";
56
57 const size_t COOKIE_SIZE = 20;
58
59 const size_t MAX_PASSWORD_LEN = 32;
60 const unsigned int MAX_PASSWORD_HISTORY = 50;
61
62 const int SECURITY_SERVER_MAX_OBJ_NAME         = 30;
63
64 } // namespace SecurityServer
65