[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1281518882-4130-1-git-send-email-jslaby@suse.cz>
Date: Wed, 11 Aug 2010 11:28:02 +0200
From: Jiri Slaby <jslaby@...e.cz>
To: john.johansen@...onical.com
Cc: jirislaby@...il.com, linux-kernel@...r.kernel.org,
linux-security-module@...r.kernel.org, Jiri Slaby <jslaby@...e.cz>,
James Morris <jmorris@...ei.org>
Subject: [PATCH 1/1] 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@...e.cz>
Cc: John Johansen <john.johansen@...onical.com>
Cc: James Morris <jmorris@...ei.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists