Lines Matching refs:cred

20 struct cred;
66 extern void set_groups(struct cred *, struct group_info *);
111 struct cred { struct
149 extern void __put_cred(struct cred *); argument
152 extern const struct cred *get_task_cred(struct task_struct *);
153 extern struct cred *cred_alloc_blank(void);
154 extern struct cred *prepare_creds(void);
155 extern struct cred *prepare_exec_creds(void);
156 extern int commit_creds(struct cred *);
157 extern void abort_creds(struct cred *);
158 extern struct cred *prepare_kernel_cred(struct task_struct *);
159 extern int set_security_override(struct cred *, u32);
160 extern int set_security_override_from_ctx(struct cred *, const char *);
161 extern int set_create_files_as(struct cred *, struct inode *);
162 extern int cred_fscmp(const struct cred *, const struct cred *);
164 extern int set_cred_ucounts(struct cred *);
166 static inline bool cap_ambient_invariant_ok(const struct cred *cred) in cap_ambient_invariant_ok() argument
168 return cap_issubset(cred->cap_ambient, in cap_ambient_invariant_ok()
169 cap_intersect(cred->cap_permitted, in cap_ambient_invariant_ok()
170 cred->cap_inheritable)); in cap_ambient_invariant_ok()
173 static inline const struct cred *override_creds(const struct cred *override_cred) in override_creds()
175 return rcu_replace_pointer(current->cred, override_cred, 1); in override_creds()
178 static inline const struct cred *revert_creds(const struct cred *revert_cred) in revert_creds()
180 return rcu_replace_pointer(current->cred, revert_cred, 1); in revert_creds()
197 static inline const struct cred *get_cred_many(const struct cred *cred, int nr) in get_cred_many() argument
199 struct cred *nonconst_cred = (struct cred *) cred; in get_cred_many()
200 if (!cred) in get_cred_many()
201 return cred; in get_cred_many()
204 return cred; in get_cred_many()
216 static inline const struct cred *get_cred(const struct cred *cred) in get_cred() argument
218 return get_cred_many(cred, 1); in get_cred()
221 static inline const struct cred *get_cred_rcu(const struct cred *cred) in get_cred_rcu() argument
223 struct cred *nonconst_cred = (struct cred *) cred; in get_cred_rcu()
224 if (!cred) in get_cred_rcu()
229 return cred; in get_cred_rcu()
244 static inline void put_cred_many(const struct cred *_cred, int nr) in put_cred_many()
246 struct cred *cred = (struct cred *) _cred; in put_cred_many() local
248 if (cred) { in put_cred_many()
249 if (atomic_long_sub_and_test(nr, &cred->usage)) in put_cred_many()
250 __put_cred(cred); in put_cred_many()
261 static inline void put_cred(const struct cred *cred) in put_cred() argument
263 put_cred_many(cred, 1); in put_cred()
273 rcu_dereference_protected(current->cred, 1)
316 const struct cred *__cred; \
331 const struct cred *__cred; \
339 __typeof__(((struct cred *)NULL)->xxx) ___val; \
380 const struct cred *__cred; \
388 const struct cred *__cred; \
396 const struct cred *__cred; \