diff options
author | 2023-08-11 05:26:05 -0300 | |
---|---|---|
committer | 2023-09-08 04:57:37 -0300 | |
commit | c6d33375cc34e4e5e527ab43c219adfbc8848c62 (patch) | |
tree | 0ccf4359f9b8ab8a5c4e37bd042fbf19314f12a8 /etc/profile-m-z/xed.profile | |
parent | profiles: fix some comments (diff) | |
download | firejail-c6d33375cc34e4e5e527ab43c219adfbc8848c62.tar.gz firejail-c6d33375cc34e4e5e527ab43c219adfbc8848c62.tar.zst firejail-c6d33375cc34e4e5e527ab43c219adfbc8848c62.zip |
profiles: fix commented code and eol comments
Main changes:
* Remove the space after `#` for commented code lines to distinguish
them from normal comments
* Use `#` instead of `-` for comments at the end of the line so that
commented code lines work after being uncommented
Commands used to search and replace:
arg0="$(cat contrib/syntax/lists/profile_commands_arg0.list |
LC_ALL=C sort -u | tr '\n' '|' | sed -e 's/|$//' -e 's/\./\\./g')"
arg1="$(cat contrib/syntax/lists/profile_commands_arg1.list |
LC_ALL=C sort -u | tr '\n' '|' | sed -e 's/|$//' -e 's/\./\\./g')"
git ls-files -z -- etc/inc etc/profile* | xargs -0 -I '{}' \
sh -c "printf '%s\n' \"\$(sed -E \
-e 's/^# ($arg0)( [#-]-? .*)?\$/#\\1\\2/' \
-e 's/^# ($arg1)( [^ ]*)?( [#-]-? .*)?\$/#\\1\\2\\3/' \
-e 's/^# (whitelist \\$)/#\\1/' \
-e 's/^(#[^ ].+) --? /\\1 # /' \
'{}')\" >'{}'"
Commands used to check for leftover entries:
arg0="$(cat contrib/syntax/lists/profile_commands_arg0.list |
LC_ALL=C sort -u | tr '\n' '|' | sed -e 's/|$//' -e 's/\./\\./g')"
arg1="$(cat contrib/syntax/lists/profile_commands_arg1.list |
LC_ALL=C sort -u | tr '\n' '|' | sed -e 's/|$//' -e 's/\./\\./g')"
git grep -E "^# ($arg0|$arg1)( +|$)" -- etc/inc etc/profile*
See also commit 30f9ad908 ("build: improve comments in firecfg.config",
2023-08-05) / PR #5942.
Diffstat (limited to 'etc/profile-m-z/xed.profile')
-rw-r--r-- | etc/profile-m-z/xed.profile | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/etc/profile-m-z/xed.profile b/etc/profile-m-z/xed.profile index dda803bd5..b47437e2d 100644 --- a/etc/profile-m-z/xed.profile +++ b/etc/profile-m-z/xed.profile | |||
@@ -23,10 +23,10 @@ include disable-shell.inc | |||
23 | 23 | ||
24 | include whitelist-var-common.inc | 24 | include whitelist-var-common.inc |
25 | 25 | ||
26 | # apparmor - makes settings immutable | 26 | #apparmor # makes settings immutable |
27 | caps.drop all | 27 | caps.drop all |
28 | machine-id | 28 | machine-id |
29 | # net none - makes settings immutable | 29 | #net none # makes settings immutable |
30 | no3d | 30 | no3d |
31 | nodvd | 31 | nodvd |
32 | nogroups | 32 | nogroups |
@@ -46,9 +46,9 @@ private-dev | |||
46 | private-tmp | 46 | private-tmp |
47 | 47 | ||
48 | # makes settings immutable | 48 | # makes settings immutable |
49 | # dbus-user none | 49 | #dbus-user none |
50 | # dbus-system none | 50 | #dbus-system none |
51 | 51 | ||
52 | # xed uses python plugins, memory-deny-write-execute breaks python | 52 | # xed uses python plugins, memory-deny-write-execute breaks python |
53 | # memory-deny-write-execute | 53 | #memory-deny-write-execute |
54 | restrict-namespaces | 54 | restrict-namespaces |