Codebase list debian-goodies / 03ae38b
dman: fix bad signal handling that could lead to insecure use of /tmp Always exit the script after catching a terminating signal. Modeled after a similar fix in who-uploads: https://salsa.debian.org/debian/devscripts/-/commit/33460eeb Closes: #911720 Thanks to Jakub Wilk for reporting and Mattia Rizzolo for the similar fix in who-uploads which I could use as pattern. Axel Beckert 1 year, 10 months ago
2 changed file(s) with 7 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
99 * Mention https://dhomepage.debian.net/ in dhomepage(1) man page.
1010 * Fix documentation of used pattern type for package names in
1111 dgrep(1). (Closes: #1012759) Also fine tune dglob(1) wrt. pattern.
12 * dman: Fix bad signal handling that could potentially lead to insecure
13 use of /tmp. Thanks to Jakub Wilk for the bug report. (Closes: #911720)
1214
1315 [ Unit 193 ]
1416 * checkrestart: Handle the possibility of systemd units in
108108 BASE_URL="https://dyn.manpages.debian.org"
109109
110110 mandir=`mktemp --tmpdir="${TMPDIR:-/tmp}" -d dman.XXXXXX`
111 trap "rm -rf $mandir" EXIT HUP INT QUIT TERM
111 exit_with_error() {
112 [ ! -d "$mandir" ] || rm -r "$mandir"
113 exit 1
114 }
115 trap exit_with_error EXIT HUP INT QUIT TERM
112116 man="$mandir/$PAGE"
113117
114118 TESTED_URLS=""