diff options
Diffstat (limited to 'include/linux/cred.h')
-rw-r--r-- | include/linux/cred.h | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/include/linux/cred.h b/include/linux/cred.h index 2fb2ca2127ed..8b6c083e68a7 100644 --- a/include/linux/cred.h +++ b/include/linux/cred.h | |||
@@ -62,9 +62,27 @@ do { \ | |||
62 | groups_free(group_info); \ | 62 | groups_free(group_info); \ |
63 | } while (0) | 63 | } while (0) |
64 | 64 | ||
65 | extern struct group_info *groups_alloc(int); | ||
66 | extern struct group_info init_groups; | 65 | extern struct group_info init_groups; |
66 | #ifdef CONFIG_MULTIUSER | ||
67 | extern struct group_info *groups_alloc(int); | ||
67 | extern void groups_free(struct group_info *); | 68 | extern void groups_free(struct group_info *); |
69 | |||
70 | extern int in_group_p(kgid_t); | ||
71 | extern int in_egroup_p(kgid_t); | ||
72 | #else | ||
73 | static inline void groups_free(struct group_info *group_info) | ||
74 | { | ||
75 | } | ||
76 | |||
77 | static inline int in_group_p(kgid_t grp) | ||
78 | { | ||
79 | return 1; | ||
80 | } | ||
81 | static inline int in_egroup_p(kgid_t grp) | ||
82 | { | ||
83 | return 1; | ||
84 | } | ||
85 | #endif | ||
68 | extern int set_current_groups(struct group_info *); | 86 | extern int set_current_groups(struct group_info *); |
69 | extern void set_groups(struct cred *, struct group_info *); | 87 | extern void set_groups(struct cred *, struct group_info *); |
70 | extern int groups_search(const struct group_info *, kgid_t); | 88 | extern int groups_search(const struct group_info *, kgid_t); |
@@ -74,9 +92,6 @@ extern bool may_setgroups(void); | |||
74 | #define GROUP_AT(gi, i) \ | 92 | #define GROUP_AT(gi, i) \ |
75 | ((gi)->blocks[(i) / NGROUPS_PER_BLOCK][(i) % NGROUPS_PER_BLOCK]) | 93 | ((gi)->blocks[(i) / NGROUPS_PER_BLOCK][(i) % NGROUPS_PER_BLOCK]) |
76 | 94 | ||
77 | extern int in_group_p(kgid_t); | ||
78 | extern int in_egroup_p(kgid_t); | ||
79 | |||
80 | /* | 95 | /* |
81 | * The security context of a task | 96 | * The security context of a task |
82 | * | 97 | * |