Skip to content

Instantly share code, notes, and snippets.

@gcmurphy
Last active October 29, 2015 23:19
Show Gist options
  • Save gcmurphy/f5472b42bcc0658a0c27 to your computer and use it in GitHub Desktop.
Save gcmurphy/f5472b42bcc0658a0c27 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <sys/capability.h>
int main(){
char *txt = NULL;
cap_t caps = cap_get_proc();
txt = cap_to_text(caps, NULL);
printf("caps = %s\n", txt);
if (caps) cap_free(caps);
if (txt) cap_free(txt);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment