• Home
  • Raw
  • Download

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 const struct cred *override_creds(const struct cred *);
159 extern void revert_creds(const struct cred *);
160 extern struct cred *prepare_kernel_cred(struct task_struct *);
161 extern int set_security_override(struct cred *, u32);
162 extern int set_security_override_from_ctx(struct cred *, const char *);
163 extern int set_create_files_as(struct cred *, struct inode *);
164 extern int cred_fscmp(const struct cred *, const struct cred *);
166 extern int set_cred_ucounts(struct cred *);
168 static inline bool cap_ambient_invariant_ok(const struct cred *cred) in cap_ambient_invariant_ok() argument
170 return cap_issubset(cred->cap_ambient, in cap_ambient_invariant_ok()
171 cap_intersect(cred->cap_permitted, in cap_ambient_invariant_ok()
172 cred->cap_inheritable)); in cap_ambient_invariant_ok()
183 static inline struct cred *get_new_cred_many(struct cred *cred, int nr) in get_new_cred_many() argument
185 atomic_long_add(nr, &cred->usage); in get_new_cred_many()
186 return cred; in get_new_cred_many()
196 static inline struct cred *get_new_cred(struct cred *cred) in get_new_cred() argument
198 return get_new_cred_many(cred, 1); in get_new_cred()
215 static inline const struct cred *get_cred_many(const struct cred *cred, int nr) in get_cred_many() argument
217 struct cred *nonconst_cred = (struct cred *) cred; in get_cred_many()
218 if (!cred) in get_cred_many()
219 return cred; in get_cred_many()
233 static inline const struct cred *get_cred(const struct cred *cred) in get_cred() argument
235 return get_cred_many(cred, 1); in get_cred()
238 static inline const struct cred *get_cred_rcu(const struct cred *cred) in get_cred_rcu() argument
240 struct cred *nonconst_cred = (struct cred *) cred; in get_cred_rcu()
241 if (!cred) in get_cred_rcu()
246 return cred; in get_cred_rcu()
261 static inline void put_cred_many(const struct cred *_cred, int nr) in put_cred_many()
263 struct cred *cred = (struct cred *) _cred; in put_cred_many() local
265 if (cred) { in put_cred_many()
266 if (atomic_long_sub_and_test(nr, &cred->usage)) in put_cred_many()
267 __put_cred(cred); in put_cred_many()
278 static inline void put_cred(const struct cred *cred) in put_cred() argument
280 put_cred_many(cred, 1); in put_cred()
290 rcu_dereference_protected(current->cred, 1)
333 const struct cred *__cred; \
348 const struct cred *__cred; \
356 __typeof__(((struct cred *)NULL)->xxx) ___val; \
397 const struct cred *__cred; \
405 const struct cred *__cred; \
413 const struct cred *__cred; \