public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] AppArmor: fix task_setrlimit prototype
@ 2010-08-11  9:28 Jiri Slaby
  2010-08-11 13:17 ` John Johansen
  0 siblings, 1 reply; 3+ messages in thread
From: Jiri Slaby @ 2010-08-11  9:28 UTC (permalink / raw)
  To: john.johansen
  Cc: jirislaby, linux-kernel, linux-security-module, Jiri Slaby,
	James Morris

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>
Cc: John Johansen <john.johansen@canonical.com>
Cc: James Morris <jmorris@namei.org>
---
 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 8db33a8..06f4d02 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,
 	return error;
 }
 
-static int apparmor_task_setrlimit(unsigned int resource,
-				   struct rlimit *new_rlim)
+static int apparmor_task_setrlimit(struct task_struct *task,
+		unsigned int resource, struct rlimit *new_rlim)
 {
 	struct aa_profile *profile = aa_current_profile();
 	int error = 0;
-- 
1.7.2.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-08-15 23:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-11  9:28 [PATCH 1/1] AppArmor: fix task_setrlimit prototype Jiri Slaby
2010-08-11 13:17 ` John Johansen
2010-08-15 23:21   ` James Morris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox