From: John Johansen <john.johansen@canonical.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: James Morris <jmorris@namei.org>,
linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
Rusty Russell <rusty@rustcorp.com.au>
Subject: Re: linux-next: Fix AppArmor build warnings after merge of the security-testing tree
Date: Mon, 02 Aug 2010 19:40:31 -0700 [thread overview]
Message-ID: <4C57819F.4000405@canonical.com> (raw)
In-Reply-To: <20100802121601.363af4a9.sfr@canb.auug.org.au>
Hi Stephen,
the follow patch fixes the AppArmor build warnings from the security-next tree merge
From: John Johansen <john.johansen@canonical.com>
Date: Mon, 2 Aug 2010 19:31:57 -0700
Subject: [PATCH] AppArmor: Fix build warnings from linux-next merge
Patch AppArmor to fix build warnings for changes that exist in the
linux-next tree.
Signed-off-by: John Johansen <john.johansen@canonical.com>
---
security/apparmor/domain.c | 2 +-
security/apparmor/ipc.c | 2 +-
security/apparmor/lsm.c | 4 +++-
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/security/apparmor/domain.c b/security/apparmor/domain.c
index 08bbe63..c825c6e 100644
--- a/security/apparmor/domain.c
+++ b/security/apparmor/domain.c
@@ -62,7 +62,7 @@ static int may_change_ptraced_domain(struct task_struct *task,
struct aa_profile *to_profile)
{
struct task_struct *tracer;
- struct cred *cred = NULL;
+ const struct cred *cred = NULL;
struct aa_profile *tracerp = NULL;
int error = 0;
diff --git a/security/apparmor/ipc.c b/security/apparmor/ipc.c
index 9013a78..649fad8 100644
--- a/security/apparmor/ipc.c
+++ b/security/apparmor/ipc.c
@@ -100,7 +100,7 @@ int aa_ptrace(struct task_struct *tracer, struct task_struct *tracee,
if (!unconfined(tracer_p)) {
/* lcred released below */
- struct cred *lcred = get_task_cred(tracee);
+ const struct cred *lcred = get_task_cred(tracee);
struct aa_profile *tracee_p = aa_cred_profile(lcred);
error = aa_may_ptrace(tracer, tracer_p, tracee_p, mode);
diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
index d5666d3..f56978a 100644
--- a/security/apparmor/lsm.c
+++ b/security/apparmor/lsm.c
@@ -607,9 +607,11 @@ static int apparmor_setprocattr(struct task_struct *task, char *name,
return error;
}
-static int apparmor_task_setrlimit(unsigned int resource,
+static int apparmor_task_setrlimit(struct task_struct *tsk,
+ unsigned int resource,
struct rlimit *new_rlim)
{
+ /* Use current profile instead of profile on @tsk */
struct aa_profile *profile = aa_current_profile();
int error = 0;
--
1.7.0.4
next prev parent reply other threads:[~2010-08-03 2:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-02 2:16 linux-next: build failure after merge of the security-testing tree Stephen Rothwell
2010-08-03 0:04 ` John Johansen
2010-08-05 1:37 ` Stephen Rothwell
2010-08-03 2:40 ` John Johansen [this message]
2010-08-18 0:56 ` linux-next: Fix AppArmor build warnings " Stephen Rothwell
2010-08-18 1:00 ` Stephen Rothwell
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=4C57819F.4000405@canonical.com \
--to=john.johansen@canonical.com \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=sfr@canb.auug.org.au \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox