diff options
author | Mike Pagano <mpagano@gentoo.org> | 2017-06-25 17:11:55 -0400 |
---|---|---|
committer | Mike Pagano <mpagano@gentoo.org> | 2017-06-25 17:11:55 -0400 |
commit | d91374e71be2432d9e44e948797aae393ac841de (patch) | |
tree | 064ec93f87e516c3a9b8fdf9f91e1fae1b20e1e1 | |
parent | Gentoo Linux support config settings and defaults. Patch to add support for n... (diff) | |
download | linux-patches-d91374e71be2432d9e44e948797aae393ac841de.tar.gz linux-patches-d91374e71be2432d9e44e948797aae393ac841de.tar.bz2 linux-patches-d91374e71be2432d9e44e948797aae393ac841de.zip |
security/apparmor: Use POSIX-compatible printf %s. See bug #622552
-rw-r--r-- | 0000_README | 4 | ||||
-rw-r--r-- | 1520_security-apparmor-Use-POSIX-compatible-printf.patch | 41 |
2 files changed, 45 insertions, 0 deletions
diff --git a/0000_README b/0000_README index 58e3c749..3d0137c8 100644 --- a/0000_README +++ b/0000_README @@ -51,6 +51,10 @@ Patch: 1510_fs-enable-link-security-restrictions-by-default.patch From: http://sources.debian.net/src/linux/3.16.7-ckt4-3/debian/patches/debian/fs-enable-link-security-restrictions-by-default.patch/ Desc: Enable link security restrictions by default. +Patch: 1520_security-apparmor-Use-POSIX-compatible-printf.patch +From: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/patch/security/apparmor?id=651e54953b5d4ad103f0efa54fc6b380807fca3a +Desc: security/apparmor: Use POSIX-compatible "printf '%s'". See bug #622552 + Patch: 2300_enable-poweroff-on-Mac-Pro-11.patch From: http://kernel.ubuntu.com/git/ubuntu/ubuntu-xenial.git/patch/drivers/pci/quirks.c?id=5080ff61a438f3dd80b88b423e1a20791d8a774c Desc: Workaround to enable poweroff on Mac Pro 11. See bug #601964. diff --git a/1520_security-apparmor-Use-POSIX-compatible-printf.patch b/1520_security-apparmor-Use-POSIX-compatible-printf.patch new file mode 100644 index 00000000..d8585e47 --- /dev/null +++ b/1520_security-apparmor-Use-POSIX-compatible-printf.patch @@ -0,0 +1,41 @@ +From 651e54953b5d4ad103f0efa54fc6b380807fca3a Mon Sep 17 00:00:00 2001 +From: Thomas Schneider <qsx@qsx.re> +Date: Fri, 14 Oct 2016 21:29:49 +0200 +Subject: security/apparmor: Use POSIX-compatible "printf '%s'" + +When using a strictly POSIX-compliant shell, "-n #define ..." gets +written into the file. Use "printf '%s'" to avoid this. + +Signed-off-by: Thomas Schneider <qsx@qsx.re> +Signed-off-by: John Johansen <john.johansen@canonical.com> +--- + security/apparmor/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +(limited to 'security/apparmor') + +diff --git a/security/apparmor/Makefile b/security/apparmor/Makefile +index ad369a7..2ded2f1 100644 +--- a/security/apparmor/Makefile ++++ b/security/apparmor/Makefile +@@ -20,7 +20,7 @@ cmd_make-caps = echo "static const char *const capability_names[] = {" > $@ ;\ + sed $< >>$@ -r -n -e '/CAP_FS_MASK/d' \ + -e 's/^\#define[ \t]+CAP_([A-Z0-9_]+)[ \t]+([0-9]+)/[\2] = "\L\1",/p';\ + echo "};" >> $@ ;\ +- echo -n '\#define AA_FS_CAPS_MASK "' >> $@ ;\ ++ printf '%s' '\#define AA_FS_CAPS_MASK "' >> $@ ;\ + sed $< -r -n -e '/CAP_FS_MASK/d' \ + -e 's/^\#define[ \t]+CAP_([A-Z0-9_]+)[ \t]+([0-9]+)/\L\1/p' | \ + tr '\n' ' ' | sed -e 's/ $$/"\n/' >> $@ +@@ -56,7 +56,7 @@ cmd_make-rlim = echo "static const char *const rlim_names[RLIM_NLIMITS] = {" \ + echo "static const int rlim_map[RLIM_NLIMITS] = {" >> $@ ;\ + sed -r -n "s/^\# ?define[ \t]+(RLIMIT_[A-Z0-9_]+).*/\1,/p" $< >> $@ ;\ + echo "};" >> $@ ; \ +- echo -n '\#define AA_FS_RLIMIT_MASK "' >> $@ ;\ ++ printf '%s' '\#define AA_FS_RLIMIT_MASK "' >> $@ ;\ + sed -r -n 's/^\# ?define[ \t]+RLIMIT_([A-Z0-9_]+).*/\L\1/p' $< | \ + tr '\n' ' ' | sed -e 's/ $$/"\n/' >> $@ + +-- +cgit v1.1 + |