Skip to content

Instantly share code, notes, and snippets.

@vmarmol
vmarmol / cap.c
Created May 15, 2014 16:55
Check Supported Capability
#include <stdio.h>
#include <sys/capability.h>
#include <sys/types.h>
int main() {
printf("Supported: \"%s\"\n", cap_to_name(CAP_CHOWN));
printf("Not Supported: \"%s\"\n", cap_to_name(34 /* CAP_SYSLOG */));
// NOTE: These strings should be free'd.
return 0;
}