Skip to content

Instantly share code, notes, and snippets.

@dvilelaf
dvilelaf / ambient.c
Created June 14, 2021 07:51 — forked from tomix86/ambient.c
Set ambient capabilities
/*
* Test program for the ambient capabilities
*
* You need to install libcap-ng-dev first, then compile using:
* $ gcc -o ambient ambient.c -lcap-ng && sudo setcap cap_setpcap,cap_net_raw,cap_net_admin,cap_sys_nice+eip ambient
*
* To get a shell with additional caps that can be inherited do:
*
* ./ambient /bin/bash
*/