mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-25 08:02:56 +00:00
CRED: Wrap current->cred and a few other accessors
Wrap current->cred and a few other accessors to hide their actual implementation. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: James Morris <jmorris@namei.org> Acked-by: Serge Hallyn <serue@us.ibm.com> Signed-off-by: James Morris <jmorris@namei.org>
This commit is contained in:
parent
f1752eec61
commit
86a264abe5
27 changed files with 271 additions and 162 deletions
|
@ -44,7 +44,7 @@
|
|||
|
||||
static __inline__ int scm_check_creds(struct ucred *creds)
|
||||
{
|
||||
struct cred *cred = current->cred;
|
||||
const struct cred *cred = current_cred();
|
||||
|
||||
if ((creds->pid == task_tgid_vnr(current) || capable(CAP_SYS_ADMIN)) &&
|
||||
((creds->uid == cred->uid || creds->uid == cred->euid ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue