Lines Matching +full:1 +full:- +full:9 +full:a +full:- +full:d
1 # SPDX-License-Identifier: GPL-2.0
4 obj-$(CONFIG_SECURITY_APPARMOR) += apparmor.o
6 apparmor-y := apparmorfs.o audit.o capability.o task.o ipc.o lib.o match.o \
10 apparmor-$(CONFIG_SECURITY_APPARMOR_HASH) += crypto.o
12 obj-$(CONFIG_SECURITY_APPARMOR_KUNIT_TEST) += apparmor_policy_unpack_test.o
13 apparmor_policy_unpack_test-objs += policy_unpack_test.o
15 clean-files := capability_names.h rlim_names.h net_names.h
17 # Build a lower case string table of address family names
19 # #define AF_LOCAL 1 /* POSIX name for AF_UNIX */
22 # [1] = "local",
30 quiet_cmd_make-af = GEN $@
31 cmd_make-af = echo "static const char *address_family_names[] = {" > $@ ;\
32 sed $< >>$@ -r -n -e "/AF_MAX/d" -e "/AF_LOCAL/d" -e "/AF_ROUTE/d" -e \
33 's/^\#define[ \t]+AF_([A-Z0-9_]+)[ \t]+([0-9]+)(.*)/[\2] = "\L\1",/p';\
36 sed -r -n -e "/AF_MAX/d" -e "/AF_LOCAL/d" -e "/AF_ROUTE/d" -e \
37 's/^\#define[ \t]+AF_([A-Z0-9_]+)[ \t]+([0-9]+)(.*)/\L\1/p'\
38 $< | tr '\n' ' ' | sed -e 's/ $$/"\n/' >> $@
40 # Build a lower case string table of sock type names
42 # SOCK_STREAM = 1,
44 # [1] = "stream",
45 quiet_cmd_make-sock = GEN $@
46 cmd_make-sock = echo "static const char *sock_type_names[] = {" >> $@ ;\
47 sed $^ >>$@ -r -n \
48 -e 's/^\tSOCK_([A-Z0-9_]+)[\t]+=[ \t]+([0-9]+)(.*)/[\2] = "\L\1",/p';\
51 # Build a lower case string table of capability names
53 # #define CAP_DAC_OVERRIDE 1
55 # [1] = "dac_override",
56 quiet_cmd_make-caps = GEN $@
57 cmd_make-caps = echo "static const char *const capability_names[] = {" > $@ ;\
58 sed $< >>$@ -r -n -e '/CAP_FS_MASK/d' \
59 -e 's/^\#define[ \t]+CAP_([A-Z0-9_]+)[ \t]+([0-9]+)/[\2] = "\L\1",/p';\
62 sed $< -r -n -e '/CAP_FS_MASK/d' \
63 -e 's/^\#define[ \t]+CAP_([A-Z0-9_]+)[ \t]+([0-9]+)/\L\1/p' | \
64 tr '\n' ' ' | sed -e 's/ $$/"\n/' >> $@
67 # Build a lower case string table of rlimit names.
73 # and build a second integer table (with the second sed cmd), that maps
74 # RLIMIT defines to the order defined in asm-generic/resource.h This is
84 # #define RLIMIT_FSIZE 1 /* Maximum filesize */
88 quiet_cmd_make-rlim = GEN $@
89 cmd_make-rlim = echo "static const char *const rlim_names[RLIM_NLIMITS] = {" \
91 sed $< >> $@ -r -n \
92 -e 's/^\# ?define[ \t]+(RLIMIT_([A-Z0-9_]+)).*/[\1] = "\L\2",/p';\
95 sed -r -n "s/^\# ?define[ \t]+(RLIMIT_[A-Z0-9_]+).*/\1,/p" $< >> $@ ;\
98 sed -r -n 's/^\# ?define[ \t]+RLIMIT_([A-Z0-9_]+).*/\L\1/p' $< | \
99 tr '\n' ' ' | sed -e 's/ $$/"\n/' >> $@
106 $(call cmd,make-caps)
107 $(obj)/rlim_names.h : $(srctree)/include/uapi/asm-generic/resource.h \
109 $(call cmd,make-rlim)
113 $(call cmd,make-af)
114 $(call cmd,make-sock)