wok annotate tpp/stuff/optional-x.patch @ rev 25332
updated strace (5.6 -> 5.18)
author | Hans-G?nter Theisgen |
---|---|
date | Sat Jul 23 14:59:58 2022 +0100 (2022-07-23) |
parents | |
children |
rev | line source |
---|---|
paul@16778 | 1 Description: Don't execute commands with --exec by default |
paul@16778 | 2 Author: Axel Beckert <abe@debian.org> |
paul@16778 | 3 Debian-Bug: 706644 |
paul@16778 | 4 |
paul@16778 | 5 Index: tpp/tpp.rb |
paul@16778 | 6 =================================================================== |
paul@16778 | 7 --- tpp.orig/tpp.rb 2013-06-12 22:13:55.000000000 +0200 |
paul@16778 | 8 +++ tpp/tpp.rb 2013-06-12 22:15:08.000000000 +0200 |
paul@16778 | 9 @@ -725,9 +725,13 @@ |
paul@16778 | 10 end |
paul@16778 | 11 |
paul@16778 | 12 def do_exec(cmdline) |
paul@16778 | 13 - rc = Kernel.system(cmdline) |
paul@16778 | 14 - if not rc then |
paul@16778 | 15 - # @todo: add error message |
paul@16778 | 16 + if $execok then |
paul@16778 | 17 + rc = Kernel.system(cmdline) |
paul@16778 | 18 + if not rc then |
paul@16778 | 19 + # @todo: add error message |
paul@16778 | 20 + end |
paul@16778 | 21 + else |
paul@16778 | 22 + @screen.addstr("--exec disabled by default for security reasons. Use option -x to enable it.") |
paul@16778 | 23 end |
paul@16778 | 24 end |
paul@16778 | 25 |
paul@16778 | 26 @@ -1683,6 +1687,7 @@ |
paul@16778 | 27 $stderr.puts "\t -t <type>\tset filetype <type> as output format" |
paul@16778 | 28 $stderr.puts "\t -o <file>\twrite output to file <file>" |
paul@16778 | 29 $stderr.puts "\t -s <seconds>\twait <seconds> seconds between slides (with -t autoplay)" |
paul@16778 | 30 + $stderr.puts "\t -x\t\tallow parsing of --exec in input files" |
paul@16778 | 31 $stderr.puts "\t --version\tprint the version" |
paul@16778 | 32 $stderr.puts "\t --help\t\tprint this help" |
paul@16778 | 33 $stderr.puts "\n\t currently available types: ncurses (default), autoplay, latex, txt" |
paul@16778 | 34 @@ -1699,6 +1704,7 @@ |
paul@16778 | 35 output = nil |
paul@16778 | 36 type = "ncurses" |
paul@16778 | 37 time = 1 |
paul@16778 | 38 +$execok = nil |
paul@16778 | 39 |
paul@16778 | 40 skip_next = false |
paul@16778 | 41 |
paul@16778 | 42 @@ -1720,6 +1726,8 @@ |
paul@16778 | 43 elsif ARGV[i] == "-s" then |
paul@16778 | 44 time = ARGV[i+1].to_i |
paul@16778 | 45 skip_next = true |
paul@16778 | 46 + elsif ARGV[i] == "-x" then |
paul@16778 | 47 + $execok = 1 |
paul@16778 | 48 elsif input == nil then |
paul@16778 | 49 input = ARGV[i] |
paul@16778 | 50 end |
paul@16778 | 51 |