aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile22
-rw-r--r--contrib/syntax/lists/profile_commands_arg0.list2
2 files changed, 12 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 84fa5597a..86b45f7b2 100644
--- a/Makefile
+++ b/Makefile
@@ -106,13 +106,13 @@ syntax: $(SYNTAX_FILES)
106contrib/syntax/lists/profile_commands_arg0.list: src/firejail/profile.c Makefile 106contrib/syntax/lists/profile_commands_arg0.list: src/firejail/profile.c Makefile
107 @printf 'Generating %s from %s\n' $@ $< 107 @printf 'Generating %s from %s\n' $@ $<
108 @sed -En 's/.*strn?cmp\(ptr, "([^ "]*[^ ])".*/\1/p' $< | \ 108 @sed -En 's/.*strn?cmp\(ptr, "([^ "]*[^ ])".*/\1/p' $< | \
109 grep -Ev '^(include|rlimit)$$' | sed 's/\./\\./' | LC_ALL=C sort -u >$@ 109 grep -Ev '^(include|rlimit)$$' | LC_ALL=C sort -u >$@
110 110
111# TODO: private-lib is special-cased in the code and doesn't match the regex 111# TODO: private-lib is special-cased in the code and doesn't match the regex
112contrib/syntax/lists/profile_commands_arg1.list: src/firejail/profile.c Makefile 112contrib/syntax/lists/profile_commands_arg1.list: src/firejail/profile.c Makefile
113 @printf 'Generating %s from %s\n' $@ $< 113 @printf 'Generating %s from %s\n' $@ $<
114 @{ sed -En 's/.*strn?cmp\(ptr, "([^"]+) ".*/\1/p' $<; echo private-lib; } | \ 114 @{ sed -En 's/.*strn?cmp\(ptr, "([^"]+) ".*/\1/p' $<; \
115 LC_ALL=C sort -u >$@ 115 echo private-lib; } | LC_ALL=C sort -u >$@
116 116
117contrib/syntax/lists/profile_conditionals.list: src/firejail/profile.c Makefile 117contrib/syntax/lists/profile_conditionals.list: src/firejail/profile.c Makefile
118 @printf 'Generating %s from %s\n' $@ $< 118 @printf 'Generating %s from %s\n' $@ $<
@@ -139,17 +139,17 @@ contrib/syntax/lists/system_errnos.list: src/lib/errno.c Makefile
139 @printf 'Generating %s from %s\n' $@ $< 139 @printf 'Generating %s from %s\n' $@ $<
140 @sed -En 's/.*"(E[^"]+).*/\1/p' $< | LC_ALL=C sort -u >$@ 140 @sed -En 's/.*"(E[^"]+).*/\1/p' $< | LC_ALL=C sort -u >$@
141 141
142pipe_fromlf = { tr '\n' '|' | sed 's/|$$//'; } 142regex_fromlf = { tr '\n' '|' | sed -e 's/|$$//' -e 's/\./\\\\./g'; }
143space_fromlf = { tr '\n' ' ' | sed 's/ $$//'; } 143space_fromlf = { tr '\n' ' ' | sed -e 's/ $$//'; }
144edit_syntax_file = sed \ 144edit_syntax_file = sed \
145 -e "s/@make_input@/$$(basename $@). Generated from $$(basename $<) by make./" \ 145 -e "s/@make_input@/$$(basename $@). Generated from $$(basename $<) by make./" \
146 -e "s/@FJ_PROFILE_COMMANDS_ARG0@/$$($(pipe_fromlf) <contrib/syntax/lists/profile_commands_arg0.list)/" \ 146 -e "s/@FJ_PROFILE_COMMANDS_ARG0@/$$($(regex_fromlf) <contrib/syntax/lists/profile_commands_arg0.list)/" \
147 -e "s/@FJ_PROFILE_COMMANDS_ARG1@/$$($(pipe_fromlf) <contrib/syntax/lists/profile_commands_arg1.list)/" \ 147 -e "s/@FJ_PROFILE_COMMANDS_ARG1@/$$($(regex_fromlf) <contrib/syntax/lists/profile_commands_arg1.list)/" \
148 -e "s/@FJ_PROFILE_CONDITIONALS@/$$($(pipe_fromlf) <contrib/syntax/lists/profile_conditionals.list)/" \ 148 -e "s/@FJ_PROFILE_CONDITIONALS@/$$($(regex_fromlf) <contrib/syntax/lists/profile_conditionals.list)/" \
149 -e "s/@FJ_PROFILE_MACROS@/$$($(pipe_fromlf) <contrib/syntax/lists/profile_macros.list)/" \ 149 -e "s/@FJ_PROFILE_MACROS@/$$($(regex_fromlf) <contrib/syntax/lists/profile_macros.list)/" \
150 -e "s/@FJ_SYSCALLS@/$$($(space_fromlf) <contrib/syntax/lists/syscalls.list)/" \ 150 -e "s/@FJ_SYSCALLS@/$$($(space_fromlf) <contrib/syntax/lists/syscalls.list)/" \
151 -e "s/@FJ_SYSCALL_GROUPS@/$$($(pipe_fromlf) <contrib/syntax/lists/syscall_groups.list)/" \ 151 -e "s/@FJ_SYSCALL_GROUPS@/$$($(regex_fromlf) <contrib/syntax/lists/syscall_groups.list)/" \
152 -e "s/@FJ_SYSTEM_ERRNOS@/$$($(pipe_fromlf) <contrib/syntax/lists/system_errnos.list)/" 152 -e "s/@FJ_SYSTEM_ERRNOS@/$$($(regex_fromlf) <contrib/syntax/lists/system_errnos.list)/"
153 153
154contrib/syntax/files/example: contrib/syntax/files/example.in $(SYNTAX_LISTS) Makefile 154contrib/syntax/files/example: contrib/syntax/files/example.in $(SYNTAX_LISTS) Makefile
155 @printf 'Generating %s from %s\n' $@ $< 155 @printf 'Generating %s from %s\n' $@ $<
diff --git a/contrib/syntax/lists/profile_commands_arg0.list b/contrib/syntax/lists/profile_commands_arg0.list
index fd1bdb401..e7fecef4b 100644
--- a/contrib/syntax/lists/profile_commands_arg0.list
+++ b/contrib/syntax/lists/profile_commands_arg0.list
@@ -41,7 +41,7 @@ private-tmp
41quiet 41quiet
42restrict-namespaces 42restrict-namespaces
43seccomp 43seccomp
44seccomp\.block-secondary 44seccomp.block-secondary
45tab 45tab
46tracelog 46tracelog
47writable-etc 47writable-etc