~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to security/apparmor/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
 
9
9
apparmor-$(CONFIG_SECURITY_APPARMOR_COMPAT_24) += apparmorfs-24.o
10
10
 
11
 
clean-files: capability_names.h af_names.h
 
11
clean-files := capability_names.h rlim_names.h af_names.h
12
12
 
 
13
# Build a lower case string table of capability names
 
14
# Transforms lines from
 
15
#    #define CAP_DAC_OVERRIDE     1
 
16
# to
 
17
#    [1] = "dac_override",
13
18
quiet_cmd_make-caps = GEN     $@
14
 
cmd_make-caps = echo "static const char *capability_names[] = {" > $@ ; sed -n -e "/CAP_FS_MASK/d" -e "s/^\#define[ \\t]\\+CAP_\\([A-Z0-9_]\\+\\)[ \\t]\\+\\([0-9]\\+\\)\$$/[\\2]  = \"\\1\",/p" $< | tr A-Z a-z >> $@ ; echo "};" >> $@
 
19
cmd_make-caps = echo "static const char *capability_names[] = {" > $@ ;\
 
20
        sed $< >>$@ -r -n -e '/CAP_FS_MASK/d' \
 
21
        -e 's/^\#define[ \t]+CAP_([A-Z0-9_]+)[ \t]+([0-9]+)/[\2] = "\L\1",/p';\
 
22
        echo "};" >> $@
15
23
 
16
24
quiet_cmd_make-af = GEN     $@
17
25
cmd_make-af = echo "static const char *address_family_names[] = {" > $@ ; sed -n -e "/AF_MAX/d" -e "/AF_LOCAL/d" -e "s/^\#define[ \\t]\\+AF_\\([A-Z0-9_]\\+\\)[ \\t]\\+\\([0-9]\\+\\)\\(.*\\)\$$/[\\2]  = \"\\1\",/p" $< | tr A-Z a-z >> $@ ; echo "};" >> $@
18
26
 
 
27
# Build a lower case string table of rlimit names.
 
28
# Transforms lines from
 
29
#    #define RLIMIT_STACK               3       /* max stack size */
 
30
# to
 
31
#    [RLIMIT_STACK] = "stack",
 
32
#
 
33
# and build a second integer table (with the second sed cmd), that maps
 
34
# RLIMIT defines to the order defined in asm-generic/resource.h  Thi is
 
35
# required by policy load to map policy ordering of RLIMITs to internal
 
36
# ordering for architectures that redefine an RLIMIT.
 
37
# Transforms lines from
 
38
#    #define RLIMIT_STACK               3       /* max stack size */
 
39
# to
 
40
# RLIMIT_STACK, 
19
41
quiet_cmd_make-rlim = GEN     $@
20
 
cmd_make-rlim = echo "static const char *rlim_names[] = {" > $@ ; sed -n --e "/AF_MAX/d" -e "s/^\# \\?define[ \\t]\\+RLIMIT_\\([A-Z0-9_]\\+\\)[ \\t]\\+\\([0-9]\\+\\)\\(.*\\)\$$/[\\2]  = \"\\1\",/p" $< | tr A-Z a-z >> $@ ; echo "};" >> $@ ; echo "static const int rlim_map[] = {" >> $@ ; sed -n -e "/AF_MAX/d" -e "s/^\# \\?define[ \\t]\\+\\(RLIMIT_[A-Z0-9_]\\+\\)[ \\t]\\+\\([0-9]\\+\\)\\(.*\\)\$$/\\1,/p" $< >> $@ ; echo "};" >> $@
 
42
cmd_make-rlim = echo "static const char *rlim_names[] = {" > $@ ;\
 
43
        sed $< >> $@ -r -n \
 
44
            -e 's/^\# ?define[ \t]+(RLIMIT_([A-Z0-9_]+)).*/[\1] = "\L\2",/p';\
 
45
        echo "};" >> $@ ;\
 
46
        echo "static const int rlim_map[] = {" >> $@ ;\
 
47
        sed -r -n "s/^\# ?define[ \t]+(RLIMIT_[A-Z0-9_]+).*/\1,/p" $< >> $@ ;\
 
48
        echo "};" >> $@
21
49
 
22
50
$(obj)/capability.o : $(obj)/capability_names.h
23
51
$(obj)/net.o : $(obj)/af_names.h