diff options
author | Jiri Slaby <jslaby@suse.cz> | 2010-08-11 05:28:02 -0400 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2010-08-16 18:06:09 -0400 |
commit | 7cb4dc9fc95f89587f57f287b47e091d7806255e (patch) | |
tree | 41f68ee728c0ab1b894e425933a166e990e1eb41 /security | |
parent | da5cabf80e2433131bf0ed8993abc0f7ea618c73 (diff) |
AppArmor: fix task_setrlimit prototype
After rlimits tree was merged we get the following errors:
security/apparmor/lsm.c:663:2: warning: initialization from incompatible pointer type
It is because AppArmor was merged in the meantime, but uses the old
prototype. So fix it by adding struct task_struct as a first parameter
of apparmor_task_setrlimit.
NOTE that this is ONLY a compilation warning fix (and crashes caused
by that). It needs proper handling in AppArmor depending on who is the
'task'.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security')
-rw-r--r-- | security/apparmor/lsm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c index d5666d3cc21b..f73e2c204218 100644 --- a/security/apparmor/lsm.c +++ b/security/apparmor/lsm.c | |||
@@ -607,8 +607,8 @@ static int apparmor_setprocattr(struct task_struct *task, char *name, | |||
607 | return error; | 607 | return error; |
608 | } | 608 | } |
609 | 609 | ||
610 | static int apparmor_task_setrlimit(unsigned int resource, | 610 | static int apparmor_task_setrlimit(struct task_struct *task, |
611 | struct rlimit *new_rlim) | 611 | unsigned int resource, struct rlimit *new_rlim) |
612 | { | 612 | { |
613 | struct aa_profile *profile = aa_current_profile(); | 613 | struct aa_profile *profile = aa_current_profile(); |
614 | int error = 0; | 614 | int error = 0; |