mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-25 08:02:56 +00:00
CRED: Separate task security context from task_struct
Separate the task security context from task_struct. At this point, the security data is temporarily embedded in the task_struct with two pointers pointing to it. Note that the Alpha arch is altered as it refers to (E)UID and (E)GID in entry.S via asm-offsets. With comment fixes Signed-off-by: Marc Dionne <marc.c.dionne@gmail.com> 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
15a2460ed0
commit
b6dff3ec5e
63 changed files with 830 additions and 675 deletions
|
@ -223,10 +223,10 @@ create_elf_tables(struct linux_binprm *bprm, struct elfhdr *exec,
|
|||
NEW_AUX_ENT(AT_BASE, interp_load_addr);
|
||||
NEW_AUX_ENT(AT_FLAGS, 0);
|
||||
NEW_AUX_ENT(AT_ENTRY, exec->e_entry);
|
||||
NEW_AUX_ENT(AT_UID, tsk->uid);
|
||||
NEW_AUX_ENT(AT_EUID, tsk->euid);
|
||||
NEW_AUX_ENT(AT_GID, tsk->gid);
|
||||
NEW_AUX_ENT(AT_EGID, tsk->egid);
|
||||
NEW_AUX_ENT(AT_UID, tsk->cred->uid);
|
||||
NEW_AUX_ENT(AT_EUID, tsk->cred->euid);
|
||||
NEW_AUX_ENT(AT_GID, tsk->cred->gid);
|
||||
NEW_AUX_ENT(AT_EGID, tsk->cred->egid);
|
||||
NEW_AUX_ENT(AT_SECURE, security_bprm_secureexec(bprm));
|
||||
NEW_AUX_ENT(AT_EXECFN, bprm->exec);
|
||||
if (k_platform) {
|
||||
|
@ -1388,8 +1388,8 @@ static int fill_psinfo(struct elf_prpsinfo *psinfo, struct task_struct *p,
|
|||
psinfo->pr_zomb = psinfo->pr_sname == 'Z';
|
||||
psinfo->pr_nice = task_nice(p);
|
||||
psinfo->pr_flag = p->flags;
|
||||
SET_UID(psinfo->pr_uid, p->uid);
|
||||
SET_GID(psinfo->pr_gid, p->gid);
|
||||
SET_UID(psinfo->pr_uid, p->cred->uid);
|
||||
SET_GID(psinfo->pr_gid, p->cred->gid);
|
||||
strncpy(psinfo->pr_fname, p->comm, sizeof(psinfo->pr_fname));
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue