---
name: "PR_CAP_AMBIENT_RAISE"
section: "2const"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/PR_CAP_AMBIENT_RAISE"
---

# PR\_CAP\_AMBIENT\_RAISE(2const)

add to the ambient capability set of the calling thread

## NAME

PR\_CAP\_AMBIENT\_RAISE - add to the ambient capability set of the calling thread

## LIBRARY

Standard C library (*libc*, *-lc*)

## SYNOPSIS

```
#include <linux/prctl.h>  /* Definition of PR_* constants */
#include <sys/prctl.h>
```

**int prctl(PR\_CAP\_AMBIENT, PR\_CAP\_AMBIENT\_RAISE, long** *cap***, 0L, 0L);**

## DESCRIPTION

The capability specified in *cap* is added to the ambient capability set. The specified capability must already be present in both the permitted and the inheritable sets of the process. This operation is not permitted if the **SECBIT\_NO\_CAP\_AMBIENT\_RAISE** securebit is set.

## RETURN VALUE

On success, 0 is returned. On error, -1 is returned, and *errno* is set to indicate the error.

## ERRORS

- **EINVAL**

  *cap* does not specify a valid capability.

- **EPERM**

  either the capability specified in *cap* is not present in the process's permitted and inheritable capability sets, or the **PR\_CAP\_AMBIENT\_LOWER** securebit has been set.

## VERSIONS

See [**PR\_CAP\_AMBIENT**(2const)](/PR_CAP_AMBIENT/2const.md).

## STANDARDS

Linux.

## HISTORY

Linux 4.3.

## SEE ALSO

[**prctl**(2)](/prctl/2.md), [**PR\_CAP\_AMBIENT**(2const)](/PR_CAP_AMBIENT/2const.md), [**libcap**(3)](/libcap/3.md)
