lkml.org 
[lkml]   [2009]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/6] SECURITY: selinux, fix update_rlimit_cpu parameter
On Mon, 31 Aug 2009, Jiri Slaby wrote:

[added lsm list]

> diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
> index cf41988..496e626 100644
> --- a/security/selinux/hooks.c
> +++ b/security/selinux/hooks.c
> @@ -2360,7 +2360,7 @@ static void selinux_bprm_committing_creds(struct linux_binprm *bprm)
> initrlim = init_task.signal->rlim + i;
> rlim->rlim_cur = min(rlim->rlim_max, initrlim->rlim_cur);
> }
> - update_rlimit_cpu(rlim->rlim_cur);
> + update_rlimit_cpu(current->signal->rlim[RLIMIT_CPU].rlim_cur);

This doesn't look correct to me: the original code determines
rlim->rlim_cur and then updates current to that. With your change, this
value is not used.

--
James Morris
<jmorris@namei.org>


\
 
 \ /
  Last update: 2009-09-01 00:25    [W:0.060 / U:1.856 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site