• Home
  • Raw
  • Download

Lines Matching refs:cred

19 struct cred;
66 extern void set_groups(struct cred *, struct group_info *);
111 struct cred { struct
155 extern void __put_cred(struct cred *); argument
158 extern const struct cred *get_task_cred(struct task_struct *);
159 extern struct cred *cred_alloc_blank(void);
160 extern struct cred *prepare_creds(void);
161 extern struct cred *prepare_exec_creds(void);
162 extern int commit_creds(struct cred *);
163 extern void abort_creds(struct cred *);
164 extern const struct cred *override_creds(const struct cred *);
165 extern void revert_creds(const struct cred *);
166 extern struct cred *prepare_kernel_cred(struct task_struct *);
167 extern int change_create_files_as(struct cred *, struct inode *);
168 extern int set_security_override(struct cred *, u32);
169 extern int set_security_override_from_ctx(struct cred *, const char *);
170 extern int set_create_files_as(struct cred *, struct inode *);
171 extern int cred_fscmp(const struct cred *, const struct cred *);
178 extern void __invalid_creds(const struct cred *, const char *, unsigned);
182 extern bool creds_are_invalid(const struct cred *cred);
184 static inline void __validate_creds(const struct cred *cred, in __validate_creds() argument
187 if (unlikely(creds_are_invalid(cred))) in __validate_creds()
188 __invalid_creds(cred, file, line); in __validate_creds()
191 #define validate_creds(cred) \ argument
193 __validate_creds((cred), __FILE__, __LINE__); \
203 static inline void validate_creds(const struct cred *cred) in validate_creds() argument
214 static inline bool cap_ambient_invariant_ok(const struct cred *cred) in cap_ambient_invariant_ok() argument
216 return cap_issubset(cred->cap_ambient, in cap_ambient_invariant_ok()
217 cap_intersect(cred->cap_permitted, in cap_ambient_invariant_ok()
218 cred->cap_inheritable)); in cap_ambient_invariant_ok()
228 static inline struct cred *get_new_cred(struct cred *cred) in get_new_cred() argument
230 atomic_inc(&cred->usage); in get_new_cred()
231 return cred; in get_new_cred()
247 static inline const struct cred *get_cred(const struct cred *cred) in get_cred() argument
249 struct cred *nonconst_cred = (struct cred *) cred; in get_cred()
250 if (!cred) in get_cred()
251 return cred; in get_cred()
252 validate_creds(cred); in get_cred()
257 static inline const struct cred *get_cred_rcu(const struct cred *cred) in get_cred_rcu() argument
259 struct cred *nonconst_cred = (struct cred *) cred; in get_cred_rcu()
260 if (!cred) in get_cred_rcu()
264 validate_creds(cred); in get_cred_rcu()
266 return cred; in get_cred_rcu()
280 static inline void put_cred(const struct cred *_cred) in put_cred()
282 struct cred *cred = (struct cred *) _cred; in put_cred() local
284 if (cred) { in put_cred()
285 validate_creds(cred); in put_cred()
286 if (atomic_dec_and_test(&(cred)->usage)) in put_cred()
287 __put_cred(cred); in put_cred()
298 rcu_dereference_protected(current->cred, 1)
341 const struct cred *__cred; \
356 const struct cred *__cred; \
364 __typeof__(((struct cred *)NULL)->xxx) ___val; \
403 const struct cred *__cred; \
411 const struct cred *__cred; \
419 const struct cred *__cred; \