aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorRyan Lee <ryan.lee@canonical.com>2025-04-08 18:02:00 -0700
committerJohn Johansen <john.johansen@canonical.com>2025-05-25 20:15:01 -0700
commit95ff11895846eec76a19351a109fbabbdd86b417 (patch)
tree04e2d839358cbc41064947d359f041a3f0267775
parentapparmor: fix loop detection used in conflicting attachment resolution (diff)
downloadwireguard-linux-95ff11895846eec76a19351a109fbabbdd86b417.tar.xz
wireguard-linux-95ff11895846eec76a19351a109fbabbdd86b417.zip
apparmor: make all generated string array headers const char *const
address_family_names and sock_type_names were created as const char *a[], which declares them as (non-const) pointers to const chars. Since the pointers themselves would not be changed, they should be generated as const char *const a[]. Signed-off-by: Ryan Lee <ryan.lee@canonical.com> Signed-off-by: John Johansen <john.johansen@canonical.com>
-rw-r--r--security/apparmor/Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/apparmor/Makefile b/security/apparmor/Makefile
index be51607f52b6..12fb419714c0 100644
--- a/security/apparmor/Makefile
+++ b/security/apparmor/Makefile
@@ -28,7 +28,7 @@ clean-files := capability_names.h rlim_names.h net_names.h
# to
# #define AA_SFS_AF_MASK "local inet"
quiet_cmd_make-af = GEN $@
-cmd_make-af = echo "static const char *address_family_names[] = {" > $@ ;\
+cmd_make-af = echo "static const char *const address_family_names[] = {" > $@ ;\
sed $< >>$@ -r -n -e "/AF_MAX/d" -e "/AF_LOCAL/d" -e "/AF_ROUTE/d" -e \
's/^\#define[ \t]+AF_([A-Z0-9_]+)[ \t]+([0-9]+)(.*)/[\2] = "\L\1",/p';\
echo "};" >> $@ ;\
@@ -43,7 +43,7 @@ cmd_make-af = echo "static const char *address_family_names[] = {" > $@ ;\
# to
# [1] = "stream",
quiet_cmd_make-sock = GEN $@
-cmd_make-sock = echo "static const char *sock_type_names[] = {" >> $@ ;\
+cmd_make-sock = echo "static const char *const sock_type_names[] = {" >> $@ ;\
sed $^ >>$@ -r -n \
-e 's/^\tSOCK_([A-Z0-9_]+)[\t]+=[ \t]+([0-9]+)(.*)/[\2] = "\L\1",/p';\
echo "};" >> $@