From: John Johansen <john.johansen@canonical.com>
To: Jiri Slaby <jslaby@suse.cz>
Cc: jirislaby@gmail.com, linux-kernel@vger.kernel.org,
linux-security-module@vger.kernel.org,
James Morris <jmorris@namei.org>
Subject: Re: [PATCH 1/1] AppArmor: fix task_setrlimit prototype
Date: Wed, 11 Aug 2010 09:17:14 -0400 [thread overview]
Message-ID: <4C62A2DA.2030201@canonical.com> (raw)
In-Reply-To: <1281518882-4130-1-git-send-email-jslaby@suse.cz>
On 08/11/2010 05:28 AM, Jiri Slaby wrote:
> 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;
thanks Jiri, I'll get an update for apparmor handling task part out today.
Signed-off-by: John Johansen <john.johansen@canonical.com>
next prev parent reply other threads:[~2010-08-11 13:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-11 9:28 [PATCH 1/1] AppArmor: fix task_setrlimit prototype Jiri Slaby
2010-08-11 13:17 ` John Johansen [this message]
2010-08-15 23:21 ` James Morris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C62A2DA.2030201@canonical.com \
--to=john.johansen@canonical.com \
--cc=jirislaby@gmail.com \
--cc=jmorris@namei.org \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.