Lines Matching refs:cred

19 struct cred;
66 extern void set_groups(struct cred *, struct group_info *);
106 * task->cred points to the subjective context that defines the details of how
111 struct cred {
155 extern void __put_cred(struct cred *);
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,
187 if (unlikely(creds_are_invalid(cred)))
188 __invalid_creds(cred, file, line);
191 #define validate_creds(cred) \
193 __validate_creds((cred), __FILE__, __LINE__); \
203 static inline void validate_creds(const struct cred *cred)
214 static inline bool cap_ambient_invariant_ok(const struct cred *cred)
216 return cap_issubset(cred->cap_ambient,
217 cap_intersect(cred->cap_permitted,
218 cred->cap_inheritable));
223 * @cred: The new credentials to reference
228 static inline struct cred *get_new_cred(struct cred *cred)
230 atomic_long_inc(&cred->usage);
231 return cred;
236 * @cred: The credentials to reference
247 static inline const struct cred *get_cred(const struct cred *cred)
249 struct cred *nonconst_cred = (struct cred *) cred;
250 if (!cred)
251 return cred;
252 validate_creds(cred);
257 static inline const struct cred *get_cred_rcu(const struct cred *cred)
259 struct cred *nonconst_cred = (struct cred *) cred;
260 if (!cred)
264 validate_creds(cred);
266 return cred;
271 * @cred: The credentials to release
280 static inline void put_cred(const struct cred *_cred)
282 struct cred *cred = (struct cred *) _cred;
284 if (cred) {
285 validate_creds(cred);
286 if (atomic_long_dec_and_test(&(cred)->usage))
287 __put_cred(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; \