From 85dc4e4f43e3111b0bccf567fe64fb8045a384b2 Mon Sep 17 00:00:00 2001 From: Chris Wright Date: Mon, 3 Jan 2005 23:59:03 -0800 Subject: [PATCH] fix up dummy security module code merge OK, somehow I managed to botch this one. It happens to work fine, but I should have been more careful with forward porting this 1+ year old patch. The exec-time calc should go in bprm_apply_creds, not bprm_free_security. Thanks to Stephen for spotting my mistake. Signed-off-by: Chris Wright Signed-off-by: Linus Torvalds --- security/dummy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'security') diff --git a/security/dummy.c b/security/dummy.c index b190ca6cb8ca..ce3deb72a87f 100644 --- a/security/dummy.c +++ b/security/dummy.c @@ -180,7 +180,6 @@ static int dummy_bprm_alloc_security (struct linux_binprm *bprm) static void dummy_bprm_free_security (struct linux_binprm *bprm) { - dummy_capget(current, ¤t->cap_effective, ¤t->cap_inheritable, ¤t->cap_permitted); return; } @@ -197,6 +196,8 @@ static void dummy_bprm_apply_creds (struct linux_binprm *bprm, int unsafe) current->suid = current->euid = current->fsuid = bprm->e_uid; current->sgid = current->egid = current->fsgid = bprm->e_gid; + + dummy_capget(current, ¤t->cap_effective, ¤t->cap_inheritable, ¤t->cap_permitted); } static int dummy_bprm_set_security (struct linux_binprm *bprm) -- cgit v1.2.3