diff options
| author | Jiri Slaby <[email protected]> | 2009-08-28 08:47:16 +0000 |
|---|---|---|
| committer | Jiri Slaby <[email protected]> | 2010-01-04 10:27:18 +0000 |
| commit | 17740d89785aeb4143770923d67c293849414710 (patch) | |
| tree | 58f332b0eb828017eb4571e2f7323e859b6c268d /security/selinux/hooks.c | |
| parent | Merge branch 'reiserfs/kill-bkl' of git://git.kernel.org/pub/scm/linux/kernel... (diff) | |
| download | kernel-17740d89785aeb4143770923d67c293849414710.tar.gz kernel-17740d89785aeb4143770923d67c293849414710.zip | |
SECURITY: selinux, fix update_rlimit_cpu parameter
Don't pass current RLIMIT_RTTIME to update_rlimit_cpu() in
selinux_bprm_committing_creds, since update_rlimit_cpu expects
RLIMIT_CPU limit.
Use proper rlim[RLIMIT_CPU].rlim_cur instead to fix that.
Signed-off-by: Jiri Slaby <[email protected]>
Acked-by: James Morris <[email protected]>
Cc: Stephen Smalley <[email protected]>
Cc: Eric Paris <[email protected]>
Cc: David Howells <[email protected]>
Diffstat (limited to 'security/selinux/hooks.c')
| -rw-r--r-- | security/selinux/hooks.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 7a374c2eb043..9a2ee845e9d4 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -2365,7 +2365,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); } } |
