wok diff 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 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/tpp/stuff/optional-x.patch Sat Jul 23 14:59:58 2022 +0100 1.3 @@ -0,0 +1,51 @@ 1.4 +Description: Don't execute commands with --exec by default 1.5 +Author: Axel Beckert <abe@debian.org> 1.6 +Debian-Bug: 706644 1.7 + 1.8 +Index: tpp/tpp.rb 1.9 +=================================================================== 1.10 +--- tpp.orig/tpp.rb 2013-06-12 22:13:55.000000000 +0200 1.11 ++++ tpp/tpp.rb 2013-06-12 22:15:08.000000000 +0200 1.12 +@@ -725,9 +725,13 @@ 1.13 + end 1.14 + 1.15 + def do_exec(cmdline) 1.16 +- rc = Kernel.system(cmdline) 1.17 +- if not rc then 1.18 +- # @todo: add error message 1.19 ++ if $execok then 1.20 ++ rc = Kernel.system(cmdline) 1.21 ++ if not rc then 1.22 ++ # @todo: add error message 1.23 ++ end 1.24 ++ else 1.25 ++ @screen.addstr("--exec disabled by default for security reasons. Use option -x to enable it.") 1.26 + end 1.27 + end 1.28 + 1.29 +@@ -1683,6 +1687,7 @@ 1.30 + $stderr.puts "\t -t <type>\tset filetype <type> as output format" 1.31 + $stderr.puts "\t -o <file>\twrite output to file <file>" 1.32 + $stderr.puts "\t -s <seconds>\twait <seconds> seconds between slides (with -t autoplay)" 1.33 ++ $stderr.puts "\t -x\t\tallow parsing of --exec in input files" 1.34 + $stderr.puts "\t --version\tprint the version" 1.35 + $stderr.puts "\t --help\t\tprint this help" 1.36 + $stderr.puts "\n\t currently available types: ncurses (default), autoplay, latex, txt" 1.37 +@@ -1699,6 +1704,7 @@ 1.38 + output = nil 1.39 + type = "ncurses" 1.40 + time = 1 1.41 ++$execok = nil 1.42 + 1.43 + skip_next = false 1.44 + 1.45 +@@ -1720,6 +1726,8 @@ 1.46 + elsif ARGV[i] == "-s" then 1.47 + time = ARGV[i+1].to_i 1.48 + skip_next = true 1.49 ++ elsif ARGV[i] == "-x" then 1.50 ++ $execok = 1 1.51 + elsif input == nil then 1.52 + input = ARGV[i] 1.53 + end 1.54 +