aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/cred.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/cred.h')
-rw-r--r--include/linux/cred.h23
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
65extern struct group_info *groups_alloc(int);
66extern struct group_info init_groups; 65extern struct group_info init_groups;
66#ifdef CONFIG_MULTIUSER
67extern struct group_info *groups_alloc(int);
67extern void groups_free(struct group_info *); 68extern void groups_free(struct group_info *);
69
70extern int in_group_p(kgid_t);
71extern int in_egroup_p(kgid_t);
72#else
73static inline void groups_free(struct group_info *group_info)
74{
75}
76
77static inline int in_group_p(kgid_t grp)
78{
79 return 1;
80}
81static inline int in_egroup_p(kgid_t grp)
82{
83 return 1;
84}
85#endif
68extern int set_current_groups(struct group_info *); 86extern int set_current_groups(struct group_info *);
69extern void set_groups(struct cred *, struct group_info *); 87extern void set_groups(struct cred *, struct group_info *);
70extern int groups_search(const struct group_info *, kgid_t); 88extern 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
77extern int in_group_p(kgid_t);
78extern 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 *