aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sys.c
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2009-08-26 12:41:16 -0400
committerJiri Slaby <jirislaby@gmail.com>2010-07-16 03:48:45 -0400
commit8fd00b4d7014b00448eb33cf0590815304769798 (patch)
treef97cc5b4401dd038e539dae7ad66066383012866 /kernel/sys.c
parent2f7989efd4398d92b8adffce2e07dd043a0895fe (diff)
rlimits: security, add task_struct to setrlimit
Add task_struct to task_setrlimit of security_operations to be able to set rlimit of task other than current. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Acked-by: Eric Paris <eparis@redhat.com> Acked-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'kernel/sys.c')
-rw-r--r--kernel/sys.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sys.c b/kernel/sys.c
index e83ddbbaf89d..1ba4522689d4 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -1290,7 +1290,7 @@ SYSCALL_DEFINE2(setrlimit, unsigned int, resource, struct rlimit __user *, rlim)
1290 if (resource == RLIMIT_NOFILE && new_rlim.rlim_max > sysctl_nr_open) 1290 if (resource == RLIMIT_NOFILE && new_rlim.rlim_max > sysctl_nr_open)
1291 return -EPERM; 1291 return -EPERM;
1292 1292
1293 retval = security_task_setrlimit(resource, &new_rlim); 1293 retval = security_task_setrlimit(current, resource, &new_rlim);
1294 if (retval) 1294 if (retval)
1295 return retval; 1295 return retval;
1296 1296