]> git.proxmox.com Git - mirror_spl.git/blame - include/sys/cred.h
Fix kmem memory accounting
[mirror_spl.git] / include / sys / cred.h
CommitLineData
09b414e8 1#ifndef _SPL_CRED_H
2#define _SPL_CRED_H
f1ca4da6 3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
f1b59d26 8#include <linux/module.h>
9490c148 9#include <sys/types.h>
f1ca4da6 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. */
13typedef 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
39static __inline__ uid_t
40crgetuid(cred_t *cr)
41{
42 return 0;
43}
44
45static __inline__ gid_t
46crgetgid(cred_t *cr)
47{
48 return 0;
49}
50
51static __inline__ int
52crgetngroups(cred_t *cr)
53{
54 return 0;
55}
56
57static __inline__ gid_t *
58crgetgroups(cred_t *cr)
59{
60 return NULL;
61}
62
f1ca4da6 63#ifdef __cplusplus
64}
65#endif
66
09b414e8 67#endif /* _SPL_CRED_H */