# capability.h - [Overview](#section1132315430165626) - [Summary](#section1852449319165626) - [Data Structures](#nested-classes) - [Macros](#define-members) - [Typedefs](#typedef-members) - [Functions](#func-members) ## **Overview** **Related Modules:** [PROCESS](PROCESS.md) **Description:** Declares functions and related data structures for obtaining and setting process capabilities. **Since:** 1.0 **Version:** 1.0 ## **Summary** ## Data Structures
Indicates the capability of ignoring discretionary access control (DAC) restrictions on files. |
|
Indicates the capability of ignoring DAC restrictions on file read and search. |
|
Indicates the capability of ignoring the restrictions on the matching between the user ID of the file owner and process ID. |
|
CAP_KILL 5 |
Indicates the capability of ignoring the restrictions on sending signals to processes that do not belong to themselves. |
Indicates the capability of changing the group ID of a process. |
|
Indicates the capability of changing the user ID of a process. |
|
Indicates the capability of transferring capabilities to other processes and deleting capabilities. |
|
Indicates the capability of network broadcasting or multicasting. |
|
Indicates the capability of executing network management tasks. |
|
CAP_NET_RAW 13 |
|
Indicates the capability of executing system management tasks. |
|
CAP_SYS_BOOT 22 |
|
CAP_SYS_NICE 23 |
|
CAP_SYS_TIME 25 |
|
Indicates the capability of changing the file ownership. This macro is used by ohos_capset. |
|
Indicates the capability of ignoring DAC restrictions on file execution. This macro is used by ohos_capset. |
|
Indicates the capability of ignoring DAC restrictions on file write. This macro is used by ohos_capset. |
|
Indicates the capability of ignoring DAC restrictions on file read and search. This macro is used by ohos_capset. |
|
Indicates the capability of ignoring the restrictions on the matching between the user ID of the file owner and process ID. This macro is used by ohos_capset. |
|
Indicates the capability of ignoring the restrictions on sending signals to processes that do not belong to themselves. This macro is used by ohos_capset. |
|
Indicates the capability of changing the group ID of a process. This macro is used by ohos_capset. |
|
Indicates the capability of changing the user ID of a process. This macro is used by ohos_capset. |
|
Indicates the capability of binding a port. This macro is used by ohos_capset. |
|
Indicates the capability of network broadcasting or multicasting. This macro is used by ohos_capset. |
|
Indicates the capability of executing network management tasks. This macro is used by ohos_capset. |
|
Indicates the capability of using raw sockets. This macro is used by ohos_capset. |
|
Indicates the capability of mounting the file system. This macro is used by ohos_capset. |
|
Indicates the capability of formatting the file system. This macro is used by ohos_capset. |
|
Indicates the capability of setting the scheduling priority. This macro is used by ohos_capset. |
|
Indicates the capability of setting the date. This macro is used by ohos_capset. |
|
Indicates the capability of setting the clock. This macro is used by ohos_capset. |
|
Indicates the capability of setting the capabilities. This macro is used by ohos_capset. |
|
Indicates the capability of rebooting system. This macro is used by ohos_capset. |
|
Indicates the capability of calling shell. This macro is used by ohos_capset. |
typedef struct __user_cap_header_struct * |
|
typedef struct __user_cap_data_struct * |
capget (cap_user_header_t hdr_ptr, cap_user_data_t data_ptr) |
Obtains the capability information of a specified process based on the input parameters (compatible with the Linux API format). |
capset (cap_user_header_t hdr_ptr, const cap_user_data_t data_ptr) |
Sets the capability information for a specified process based on the input parameters (compatible with the Linux API format). |
ohos_capget (pid_t pid, unsigned int *caps) |
Obtains the capability information of the specified process process based on the input parameters. |
ohos_capset (unsigned int caps) |
Sets the capability information of the current process based on the input parameters. |