On Fri, Jul 18, 2014 at 03:23:51PM -0600, Eric Blake wrote:
Commit 5028160 accidentally weakened the strtol prohibitions to
skip ALL files under src/util instead of the former situation of
just protecting util/virsexpr.c; even though NONE of the files
in that directory need any protection.
Shorten some long lines while at it.
* cfg.mk (exclude_file_name_regexp--sc_prohibit_strtol): No need
to exclude all of util.
(exclude_file_name_regexp--sc_prohibit_sprintf): Reduce long line.
(exclude_file_name_regexp--sc_prohibit_raw_allocation): Likewise.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
cfg.mk | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/cfg.mk b/cfg.mk
index 0559edd..10dd79b 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -1065,7 +1065,7 @@ exclude_file_name_regexp--sc_prohibit_nonreentrant = \
^((po|tests)/|docs/.*(py|html\.in)|run.in$$|tools/wireshark/util/genxdrstub\.pl$$)
exclude_file_name_regexp--sc_prohibit_raw_allocation = \
-
^(docs/hacking\.html\.in)|(src/util/viralloc\.[ch]|examples/.*|tests/securityselinuxhelper\.c|tests/vircgroupmock\.c|tools/wireshark/src/packet-libvirt.c)$$
+
^(docs/hacking\.html\.in|src/util/viralloc\.[ch]|examples/.*|tests/(securityselinuxhelper|vircgroupmock)\.c|tools/wireshark/src/packet-libvirt\.c)$$
exclude_file_name_regexp--sc_prohibit_readlink = \
^src/(util/virutil|lxc/lxc_container)\.c$$
@@ -1073,12 +1073,11 @@ exclude_file_name_regexp--sc_prohibit_readlink = \
exclude_file_name_regexp--sc_prohibit_setuid = ^src/util/virutil\.c$$
exclude_file_name_regexp--sc_prohibit_sprintf = \
-
^(docs/hacking\.html\.in)|(examples/systemtap/.*stp)|(src/dtrace2systemtap\.pl)|(src/rpc/gensystemtap\.pl)|(tools/wireshark/util/genxdrstub\.pl)$$
+ ^(docs/hacking\.html\.in|.*stp|.pl)$$
This fails for me even though the regexp makes sense. Either (a)
adding an asterisk before 'pl' (the same way as for
'.*stp') or (b) encapsulating the caret in the parentheses should
work, probably one of those you meant to do.
ACK with that changed,
Martin