2 * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd All Rights Reserved
4 * Contact: Rafal Krypa <r.krypa@samsung.com>
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
10 * http://www.apache.org/licenses/LICENSE-2.0
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
19 * @file smack-common.h
20 * @author Jacek Bukarewicz <j.bukarewicz@samsung.com>
21 * @author Jan Cybulski <j.cybulski@samsung.com>
23 * @brief Header file for smack-related functions and constants
25 #ifndef _SMACK_COMMON_H_
26 #define _SMACK_COMMON_H_
29 #include <linux/xattr.h>
31 namespace SecurityManager {
32 /* Const defined below is used to label links to executables */
33 const char *const XATTR_NAME_TIZENEXEC = XATTR_SECURITY_PREFIX "TIZEN_EXEC_LABEL";
36 * Generates label for application with package identifier
37 * read from @ref pkgId and assigns it to @ref label.
39 * @param[in] pkgId application's package identifier
40 * @param[out] label string in which application's label will be stored
41 * @return true on success, false on error.
43 bool generateAppLabel(const std::string &pkgId, std::string &label);
46 #endif /* _SMACK_COMMON_H_ */