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:
David Howells 2008-11-14 10:39:18 +11:00 committed by James Morris
parent f1752eec61
commit 86a264abe5
27 changed files with 271 additions and 162 deletions

View file

@ -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 ||