summaryrefslogtreecommitdiffstats
path: root/security/apparmor/Makefile
diff options
context:
space:
mode:
authorThomas Schneider <qsx@qsx.re>2016-10-14 21:29:49 +0200
committerJohn Johansen <john.johansen@canonical.com>2017-06-08 20:29:27 +0200
commit651e54953b5d4ad103f0efa54fc6b380807fca3a (patch)
tree7dac1ac3a6ac56de8b8f446a69b21f5cda2352e3 /security/apparmor/Makefile
parentapparmor: Fix error cod in __aa_fs_profile_mkdir() (diff)
downloadlinux-651e54953b5d4ad103f0efa54fc6b380807fca3a.tar.xz
linux-651e54953b5d4ad103f0efa54fc6b380807fca3a.zip
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>
Diffstat (limited to 'security/apparmor/Makefile')
-rw-r--r--security/apparmor/Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/apparmor/Makefile b/security/apparmor/Makefile
index ad369a7aac24..2ded2f1be98b 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/' >> $@