40#define CRED_CAP_SETUID 0
41#define CRED_CAP_SETGID 1
42#define CRED_CAP_BYPASS_PERM_CHECK 2
43#define CRED_CAP_BYPASS_SECURITY_CHECK 3
45#define CRED_CAP_SETCAP 5
48#define CRED_IS_CAPABLE(a, b) ((a >> b) & 0x1)
51#define CRED_SET_CAP(b) (1ULL << b)
54#define CRED_SET_CAP_ROOT(proc) (proc->creds.caps = UINT8_MAX)
56#define CRED_MARK_ROOT(proc) \
57 proc->creds.uid = 0; \
int AuCredChangeID(int fd, UID_NUM uid, GID_NUM gid)
AuCredChangeID – change credential ids.
Definition cred.c:198
bool AuCredIsRoot(AuProcCredentials *c)
AuCredIsRoot – check if credential information is in root.
Definition cred.c:433
int AuCredCheckPermissions(AuVFSNode *node, AuProcCredentials *cred)
AuCredCheckPermissions – before giving permission, check all credentials, enei aru access koriba dibi...
Definition cred.c:321
bool AuCredInGroup(AuProcCredentials *c, GID_NUM gid)
AuCredInGroup – check the credentials if it lies in desired groupd.
Definition cred.c:443
int AuSetGID(int proc_id, GID_NUM gid)
AuSetGID – change user id of a process.
Definition cred.c:397
int AuCredGetCap(int proc_id)
Definition cred.c:291
int AuSetUID(int proc_id, UID_NUM uid)
AuSetUID – change user id of a process.
Definition cred.c:361
int AuCredSetCap(int proc_id, int cap)
Definition cred.c:264
int AuCredAddSGroup(int proc_id, int sgid)
AuCredAddSGroup – add supplimentary gid to process.
Definition cred.c:231
#define GID_NUM
Definition group.h:38
void int node
Definition kthread.h:31
#define UID_NUM
Definition user.h:35