util: add function for dropping root privileges

Share the code for dropping supplementary groups and setting effective,
saved, and real user UID/GID between system drivers.
This commit is contained in:
Miroslav Lichvar
2015-12-08 17:16:45 +01:00
parent 334ac06102
commit 3cf6acdf24
6 changed files with 28 additions and 34 deletions

View File

@@ -35,6 +35,7 @@
#include <fcntl.h>
#include <float.h>
#include <glob.h>
#include <grp.h>
#include <math.h>
#include <netdb.h>
#include <netinet/in.h>