---
name: "sk_ns_capable"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/sk_ns_capable"
---

# sk\_ns\_capable(9)

General socket capability test

## NAME

sk\_ns\_capable - General socket capability test

## SYNOPSIS

**bool sk\_ns\_capable(const struct sock \*** *sk***, struct user\_namespace \*** *user\_ns***, int** *cap***);**

## ARGUMENTS

*sk*

Socket to use a capability on or through

*user\_ns*

The user namespace of the capability to use

*cap*

The capability to use

## DESCRIPTION

Test to see if the opener of the socket had when the socket was created and the current process has the capability *cap* in the user namespace *user\_ns*.

## COPYRIGHT
