My Kernel
v0.1.0
user.h
Go to the documentation of this file.
1
13
#ifndef KERNEL_USER_H
14
#define KERNEL_USER_H
15
16
#include <
kernel/error.h
>
17
#include <kernel/types.h>
18
20
struct
user_creds
{
21
uid_t
ruid
;
22
uid_t
rgid
;
23
uid_t
euid
;
24
uid_t
egid
;
25
uid_t
suid
;
26
uid_t
sgid
;
27
};
28
29
#define UID_ROOT 0
30
31
static
inline
bool
creds_is_root(
const
struct
user_creds
*creds)
32
{
33
return
creds->
ruid
== UID_ROOT;
34
}
35
37
void
creds_copy
(
struct
user_creds
*dst,
const
struct
user_creds
*src);
38
39
#endif
/* KERNEL_USER_H */
40
41
/* @} */
error.h
user_creds::egid
uid_t egid
Definition:
user.h:24
creds_copy
void creds_copy(struct user_creds *dst, const struct user_creds *src)
Copy the credentials from src into dst.
Definition:
user.c:12
user_creds::sgid
uid_t sgid
Definition:
user.h:26
user_creds::ruid
uid_t ruid
Definition:
user.h:21
user_creds::suid
uid_t suid
Definition:
user.h:25
user_creds::rgid
uid_t rgid
Definition:
user.h:22
user_creds::euid
uid_t euid
Definition:
user.h:23
user_creds
User credentials.
Definition:
user.h:20
include
kernel
user.h
Generated by
1.9.5