Skip to content

Instantly share code, notes, and snippets.

@vmarmol
Created May 15, 2014 16:55
Show Gist options
  • Save vmarmol/7edc8cab36ffdd5ddb33 to your computer and use it in GitHub Desktop.
Save vmarmol/7edc8cab36ffdd5ddb33 to your computer and use it in GitHub Desktop.
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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment