]>
Commit | Line | Data |
---|---|---|
09b414e8 | 1 | #ifndef _SPL_CRED_H |
2 | #define _SPL_CRED_H | |
f1ca4da6 | 3 | |
4 | #ifdef __cplusplus | |
5 | extern "C" { | |
6 | #endif | |
7 | ||
f1b59d26 | 8 | #include <linux/module.h> |
f1ca4da6 | 9 | #include <linux/types.h> |
10 | ||
11 | /* XXX - Portions commented out because we really just want to have the type | |
12 | * defined and the contents aren't nearly so important at the moment. */ | |
13 | typedef struct cred { | |
14 | uint_t cr_ref; /* reference count */ | |
15 | uid_t cr_uid; /* effective user id */ | |
16 | gid_t cr_gid; /* effective group id */ | |
17 | uid_t cr_ruid; /* real user id */ | |
18 | gid_t cr_rgid; /* real group id */ | |
19 | uid_t cr_suid; /* "saved" user id (from exec) */ | |
20 | gid_t cr_sgid; /* "saved" group id (from exec) */ | |
21 | uint_t cr_ngroups; /* number of groups returned by */ | |
22 | /* crgroups() */ | |
23 | #if 0 | |
24 | cred_priv_t cr_priv; /* privileges */ | |
25 | projid_t cr_projid; /* project */ | |
26 | struct zone *cr_zone; /* pointer to per-zone structure */ | |
27 | struct ts_label_s *cr_label; /* pointer to the effective label */ | |
28 | credsid_t *cr_ksid; /* pointer to SIDs */ | |
29 | #endif | |
30 | gid_t cr_groups[1]; /* cr_groups size not fixed */ | |
31 | /* audit info is defined dynamically */ | |
32 | /* and valid only when audit enabled */ | |
33 | /* auditinfo_addr_t cr_auinfo; audit info */ | |
34 | } cred_t; | |
35 | ||
3b3ba48f | 36 | #define kcred NULL |
37 | #define CRED() NULL | |
38 | ||
39 | static __inline__ uid_t | |
40 | crgetuid(cred_t *cr) | |
41 | { | |
42 | return 0; | |
43 | } | |
44 | ||
45 | static __inline__ gid_t | |
46 | crgetgid(cred_t *cr) | |
47 | { | |
48 | return 0; | |
49 | } | |
50 | ||
51 | static __inline__ int | |
52 | crgetngroups(cred_t *cr) | |
53 | { | |
54 | return 0; | |
55 | } | |
56 | ||
57 | static __inline__ gid_t * | |
58 | crgetgroups(cred_t *cr) | |
59 | { | |
60 | return NULL; | |
61 | } | |
62 | ||
f1ca4da6 | 63 | #ifdef __cplusplus |
64 | } | |
65 | #endif | |
66 | ||
09b414e8 | 67 | #endif /* _SPL_CRED_H */ |