logo
Free, Micro AI Code Reviews That Run on Git Commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, Micro AI Code Reviews That Run on Git Commit | Product Hunt git-lrc - Free, Micro AI Code Reviews That Run on Git Commit | Product Hunt

PR_SET_KEEPCAPS - set the state of the "keep capabilities" flag

Description

Set the state of the calling thread's "keep capabilities" flag. The effect of this flag is described in capabilities(7). state must be either 0L (clear the flag) or 1L (set the flag). The "keep capabilities" value will be reset to 0 on subsequent calls to execve(2).

Errors

EINVALstate is not a valid value. EPERM The caller's SECBIT_KEEP_CAPS_LOCKED flag is set (see capabilities(7)).

History

Linux 2.2.18.

Library

Standard C library (libc, -lc)

Name

PR_SET_KEEPCAPS - set the state of the "keep capabilities" flag

Return Value

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

See Also

prctl(2), PR_GET_KEEPCAPS(2const) Linux man-pages 6.9.1 2024-06-02 PR_SET_KEEPCAPS(2const)

Standards

Linux.

Synopsis

#include<linux/prctl.h> /* Definition of PR_* constants */ #include<sys/prctl.h>intprctl(PR_SET_KEEPCAPS,longstate);

See Also