How do I patch my kernel 3.2 with apparmor kernel patches?
I have Ubuntu 12.04 with kernel 3.2 (64 bits)
I downloaded armor-2.8.0.tar.gz at https://launchpad.net/apparmor/2.8/2...r-2.8.0.tar.gz
After I untar, I go into apparmor-2.8.0/kernel-patches/3.2/ and there are 3 files:
patch -p1 < 0001-AppArmor-compatibility-patch-for-v5-network-controll.patch
But it then asks me "File to patch: ".
How do I go about this?
Thanks a lot
I am not sure if this would be best as a continuation of your other thread, or a new one.
First, did you follow the instructions in the README file which discuss using make and build? I am not sure if these are completely applicable to your need, but it would be prudent to give this section a read.
Second, the patch file shows which source file is being patched. For example, the first patch file says that security/apparmor/apparmorfs.c is being modified. Of course you will need the appropriate kernel sources, etc, as well as the instructions on how to build an Ubuntu kernel. The important part will be to sure to get the proper kernel configuration before compiling.
edit: for the networking one, there are multiple files being patched. You will probably need to point it to the parent directory, security/apparmor.
Hi, Thanks for your response.
I follow all the instructions in the README file but it showed an error message when I tried to build it.
And when I tried to patch the kernel, this is what is displayed:
can't find file to patch at input line 26
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
|From 125fccb600288968aa3395883c0a394c47176fcd Mon Sep 17 00:00:00 2001
|From: John Johansen <firstname.lastname@example.org>
|Date: Wed, 10 Aug 2011 22:02:39 -0700
|Subject: [PATCH 1/3] AppArmor: compatibility patch for v5 network controll
|Add compatibility for v5 network rules.
|Signed-off-by: John Johansen <email@example.com>
| include/linux/lsm_audit.h | 4 +
| security/apparmor/Makefile | 19 +++-
| security/apparmor/include/net.h | 40 +++++++++
| security/apparmor/include/policy.h | 3 +
| security/apparmor/lsm.c | 112 ++++++++++++++++++++++++
| security/apparmor/net.c | 170 ++++++++++++++++++++++++++++++++++++
| security/apparmor/policy.c | 1 +
| security/apparmor/policy_unpack.c | 48 +++++++++-
| 8 files changed, 394 insertions(+), 3 deletions(-)
| create mode 100644 security/apparmor/include/net.h
| create mode 100644 security/apparmor/net.c
|diff --git a/include/linux/lsm_audit.h b/include/linux/lsm_audit.h
|index 88e78de..c63979a 100644
File to patch:
I don't know what to do after this the prompt.
If anyone has any suggestion, I'd be happy to hear from you.
|All times are GMT -5. The time now is 06:49 PM.|