libauth: add procsetuser() function to change user id of the calling process

Provide a central function to change the user id
of the calling process.

This is mostly used by programs to become the none
user, followed by a call to newns().
This commit is contained in:
cinap_lenrek 2020-12-19 17:46:55 +01:00
parent daccd2b226
commit fc5070c600
6 changed files with 40 additions and 2 deletions

View file

@ -102,6 +102,8 @@ extern int amount(int, char*, int, char*);
extern int login(char*, char*, char*);
extern int procsetuser(char*);
typedef struct Attr Attr;
enum {
AttrNameval, /* name=val -- when matching, must have name=val */