Skip to content

Instantly share code, notes, and snippets.

View tomoss's full-sized avatar

Ionut Tomos tomoss

  • Cluj-Napoca, Romania
  • 11:14 (UTC +02:00)
View GitHub Profile
@sbz
sbz / lcap.c
Last active October 21, 2025 06:42
example of using linux capabilities interface libcap(3) and dump capabilities flags for the running process
#include <sys/capability.h>
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#define nitems(x) (sizeof(x) / sizeof(x[0]))
int
main(void) {