1570af302Sopenharmony_ci/*
2570af302Sopenharmony_ci * Copyright (c) Huawei Technologies Co., Ltd. 2013-2019. All rights reserved.
3570af302Sopenharmony_ci * Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
4570af302Sopenharmony_ci *
5570af302Sopenharmony_ci * Redistribution and use in source and binary forms, with or without modification,
6570af302Sopenharmony_ci * are permitted provided that the following conditions are met:
7570af302Sopenharmony_ci *
8570af302Sopenharmony_ci * 1. Redistributions of source code must retain the above copyright notice, this list of
9570af302Sopenharmony_ci *    conditions and the following disclaimer.
10570af302Sopenharmony_ci *
11570af302Sopenharmony_ci * 2. Redistributions in binary form must reproduce the above copyright notice, this list
12570af302Sopenharmony_ci *    of conditions and the following disclaimer in the documentation and/or other materials
13570af302Sopenharmony_ci *    provided with the distribution.
14570af302Sopenharmony_ci *
15570af302Sopenharmony_ci * 3. Neither the name of the copyright holder nor the names of its contributors may be used
16570af302Sopenharmony_ci *    to endorse or promote products derived from this software without specific prior written
17570af302Sopenharmony_ci *    permission.
18570af302Sopenharmony_ci *
19570af302Sopenharmony_ci * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20570af302Sopenharmony_ci * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21570af302Sopenharmony_ci * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22570af302Sopenharmony_ci * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
23570af302Sopenharmony_ci * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24570af302Sopenharmony_ci * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25570af302Sopenharmony_ci * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
26570af302Sopenharmony_ci * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
27570af302Sopenharmony_ci * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
28570af302Sopenharmony_ci * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
29570af302Sopenharmony_ci * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30570af302Sopenharmony_ci */
31570af302Sopenharmony_ci
32570af302Sopenharmony_ci#ifndef _SYS_CAPABILITY_H
33570af302Sopenharmony_ci#define _SYS_CAPABILITY_H
34570af302Sopenharmony_ci
35570af302Sopenharmony_ci#ifdef __cplusplus
36570af302Sopenharmony_ciextern "C" {
37570af302Sopenharmony_ci#endif
38570af302Sopenharmony_ci
39570af302Sopenharmony_ci#include <linux/capability.h>
40570af302Sopenharmony_ci
41570af302Sopenharmony_ciint capget(cap_user_header_t hdr_ptr, cap_user_data_t data_ptr);
42570af302Sopenharmony_ciint capset(cap_user_header_t hdr_ptr, const cap_user_data_t data_ptr);
43570af302Sopenharmony_ci
44570af302Sopenharmony_ci#ifdef __cplusplus
45570af302Sopenharmony_ci}
46570af302Sopenharmony_ci#endif
47570af302Sopenharmony_ci
48570af302Sopenharmony_ci#endif /* _SYS_CAPABILITY_H */
49