aboutsummaryrefslogtreecommitdiffstats
path: root/fs/binfmt_elf_fdpic.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2008-11-13 18:39:18 -0500
committerJames Morris <jmorris@namei.org>2008-11-13 18:39:18 -0500
commit86a264abe542cfececb4df129bc45a0338d8cdb9 (patch)
tree30152f04ba847f311028d5ca697f864c16c7ebb3 /fs/binfmt_elf_fdpic.c
parentf1752eec6145c97163dbce62d17cf5d928e28a27 (diff)
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>
Diffstat (limited to 'fs/binfmt_elf_fdpic.c')
-rw-r--r--fs/binfmt_elf_fdpic.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c
index 9f67054c2c4e..1f6e8c023b4c 100644
--- a/fs/binfmt_elf_fdpic.c
+++ b/fs/binfmt_elf_fdpic.c
@@ -475,6 +475,7 @@ static int create_elf_fdpic_tables(struct linux_binprm *bprm,
475 struct elf_fdpic_params *exec_params, 475 struct elf_fdpic_params *exec_params,
476 struct elf_fdpic_params *interp_params) 476 struct elf_fdpic_params *interp_params)
477{ 477{
478 const struct cred *cred = current_cred();
478 unsigned long sp, csp, nitems; 479 unsigned long sp, csp, nitems;
479 elf_caddr_t __user *argv, *envp; 480 elf_caddr_t __user *argv, *envp;
480 size_t platform_len = 0, len; 481 size_t platform_len = 0, len;
@@ -623,10 +624,10 @@ static int create_elf_fdpic_tables(struct linux_binprm *bprm,
623 NEW_AUX_ENT(AT_BASE, interp_params->elfhdr_addr); 624 NEW_AUX_ENT(AT_BASE, interp_params->elfhdr_addr);
624 NEW_AUX_ENT(AT_FLAGS, 0); 625 NEW_AUX_ENT(AT_FLAGS, 0);
625 NEW_AUX_ENT(AT_ENTRY, exec_params->entry_addr); 626 NEW_AUX_ENT(AT_ENTRY, exec_params->entry_addr);
626 NEW_AUX_ENT(AT_UID, (elf_addr_t) current->cred->uid); 627 NEW_AUX_ENT(AT_UID, (elf_addr_t) cred->uid);
627 NEW_AUX_ENT(AT_EUID, (elf_addr_t) current->cred->euid); 628 NEW_AUX_ENT(AT_EUID, (elf_addr_t) cred->euid);
628 NEW_AUX_ENT(AT_GID, (elf_addr_t) current->cred->gid); 629 NEW_AUX_ENT(AT_GID, (elf_addr_t) cred->gid);
629 NEW_AUX_ENT(AT_EGID, (elf_addr_t) current->cred->egid); 630 NEW_AUX_ENT(AT_EGID, (elf_addr_t) cred->egid);
630 NEW_AUX_ENT(AT_SECURE, security_bprm_secureexec(bprm)); 631 NEW_AUX_ENT(AT_SECURE, security_bprm_secureexec(bprm));
631 NEW_AUX_ENT(AT_EXECFN, bprm->exec); 632 NEW_AUX_ENT(AT_EXECFN, bprm->exec);
632 633